Skip to content

Commit f10bb6a

Browse files
committed
chore: fix accidental changes
1 parent e6c4833 commit f10bb6a

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

bin/templates/scripts/cordova/Api.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,8 @@ Api.prototype.clean = function (cleanOptions) {
681681
* @return {Promise<Requirement[]>} Promise, resolved with set of Requirement
682682
* objects for current platform.
683683
*/
684-
Api.prototype.requirements = () => check_reqs.check_all();
684+
Api.prototype.requirements = function () {
685+
return check_reqs.check_all();
686+
};
685687

686688
module.exports = Api;

bin/templates/scripts/cordova/lib/Podfile.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function Podfile (podFilePath, projectName, minDeploymentTarget) {
7171
}
7272
}
7373

74-
Podfile.prototype.__parseForDeclarations = text => {
74+
Podfile.prototype.__parseForDeclarations = function (text) {
7575
// split by \n
7676
const arr = text.split('\n');
7777

@@ -108,7 +108,7 @@ Podfile.prototype.__parseForDeclarations = text => {
108108
}, {});
109109
};
110110

111-
Podfile.prototype.__parseForSources = text => {
111+
Podfile.prototype.__parseForSources = function (text) {
112112
// split by \n
113113
const arr = text.split('\n');
114114

@@ -128,7 +128,7 @@ Podfile.prototype.__parseForSources = text => {
128128
}, {});
129129
};
130130

131-
Podfile.prototype.__parseForPods = text => {
131+
Podfile.prototype.__parseForPods = function (text) {
132132
// split by \n
133133
const arr = text.split('\n');
134134

@@ -165,7 +165,9 @@ Podfile.prototype.__parseForPods = text => {
165165
}, {});
166166
};
167167

168-
Podfile.prototype.escapeSingleQuotes = string => string.replace(/'/g, '\\\'');
168+
Podfile.prototype.escapeSingleQuotes = function (string) {
169+
return string.replace(/'/g, '\\\'');
170+
};
169171

170172
Podfile.prototype.getTemplate = function () {
171173
// Escaping possible ' in the project name

tests/spec/unit/lib/check_reqs.spec.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,25 @@ describe('check_reqs', () => {
4646
);
4747
});
4848

49-
it('should throw error because version is not following semver-notated.', () => checkTool('node', 'a.b.c').then(
50-
() => fail('Expected promise to be rejected'),
51-
err => expect(err).toEqual(new TypeError('Invalid Version: a.b.c'))
52-
));
49+
it('should throw error because version is not following semver-notated.', () => {
50+
return checkTool('node', 'a.b.c').then(
51+
() => fail('Expected promise to be rejected'),
52+
err => expect(err).toEqual(new TypeError('Invalid Version: a.b.c'))
53+
);
54+
});
5355

5456
it('should resolve passing back tool version.', () => {
5557
return checkTool('node', '1.0.0').then(result => {
5658
expect(result).toEqual({ version: '1.0.0' });
5759
});
5860
});
5961

60-
it('should reject because tool does not meet minimum requirement.', () => checkTool('node', '1.0.1').then(
61-
() => fail('Expected promise to be rejected'),
62-
reason => expect(reason).toContain('version 1.0.1 or greater, you have version 1.0.0')
63-
));
62+
it('should reject because tool does not meet minimum requirement.', () => {
63+
return checkTool('node', '1.0.1').then(
64+
() => fail('Expected promise to be rejected'),
65+
reason => expect(reason).toContain('version 1.0.1 or greater, you have version 1.0.0')
66+
);
67+
});
6468
});
6569

6670
describe('check_cocoapods method', () => {

0 commit comments

Comments
 (0)