You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by au...@apache.org on 2017/10/27 15:52:30 UTC
[2/4] cordova-lib git commit: lint fixes
lint fixes
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/3baf884b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/3baf884b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/3baf884b
Branch: refs/heads/master
Commit: 3baf884bf2f01c617483200080cf8bf9837de275
Parents: 9db9275
Author: Jarrad Whitaker <ak...@gmail.com>
Authored: Sat Oct 21 11:33:27 2017 +1100
Committer: Jarrad Whitaker <JW...@officeworks.com.au>
Committed: Fri Oct 27 10:16:54 2017 +1100
----------------------------------------------------------------------
integration-tests/HooksRunner.spec.js | 10 +++++-----
integration-tests/pkgJson-restore.spec.js | 12 ++++++------
2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3baf884b/integration-tests/HooksRunner.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/HooksRunner.spec.js b/integration-tests/HooksRunner.spec.js
index fe2c010..45e383c 100644
--- a/integration-tests/HooksRunner.spec.js
+++ b/integration-tests/HooksRunner.spec.js
@@ -459,12 +459,12 @@ describe('HooksRunner', function () {
delete call.args[1].plugin.pluginInfo._et;
}
- if (call.args[0] == 'before_plugin_uninstall' ||
- call.args[0] == 'before_plugin_install' ||
- call.args[0] == 'after_plugin_install') {
+ if (call.args[0] === 'before_plugin_uninstall' ||
+ call.args[0] === 'before_plugin_install' ||
+ call.args[0] === 'after_plugin_install') {
if (call.args[1]) {
expect(call.args[1].plugin).toBeDefined();
- if (call.args[1].plugin.platform == 'android') {
+ if (call.args[1].plugin.platform === 'android') {
expect(JSON.stringify(androidPluginOpts) ===
JSON.stringify(call.args[1])).toBe(true);
}
@@ -665,7 +665,7 @@ describe('HooksRunner', function () {
// Cleanup. Must be the last spec. Is there a better place for final cleanup in Jasmine?
it('Test 025 : should not fail during cleanup', function () {
process.chdir(path.join(__dirname, '..')); // Non e2e tests assume CWD is repo root.
- if (ext == 'sh') {
+ if (ext === 'sh') {
shell.rm('-rf', tmpDir);
} else { // Windows:
// For some mysterious reason, both shell.rm and RMDIR /S /Q won't
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3baf884b/integration-tests/pkgJson-restore.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/pkgJson-restore.spec.js b/integration-tests/pkgJson-restore.spec.js
index ed1ffd4..bcae5de 100644
--- a/integration-tests/pkgJson-restore.spec.js
+++ b/integration-tests/pkgJson-restore.spec.js
@@ -670,8 +670,8 @@ describe('update config.xml to include platforms in pkg.json', function () {
expect(configEngArray.indexOf('browser')).toEqual(-1);
expect(configEngArray.length === 1);
// Pkg.json has cordova-browser in its dependencies.
- expect(pkgJson.dependencies).toEqual({ 'cordova-android' : '^5.0.0', 'cordova-browser' : '^4.1.0' });
- emptyPlatformList().then(function() {
+ expect(pkgJson.dependencies).toEqual({ 'cordova-android': '^5.0.0', 'cordova-browser': '^4.1.0' });
+ emptyPlatformList().then(function () {
// Run cordova prepare.
return prepare();
}).then(function () {
@@ -690,9 +690,9 @@ describe('update config.xml to include platforms in pkg.json', function () {
// Expect config.xml array to have 2 elements (platforms).
expect(configEngArray.length === 2);
// Check to make sure that 'browser' spec was added properly.
- expect(engines).toEqual([ { name: 'android', spec: '^5.0.0' },{ name: 'browser', spec: '^4.1.0' } ]);
+ expect(engines).toEqual([ { name: 'android', spec: '^5.0.0' }, { name: 'browser', spec: '^4.1.0' } ]);
// No change to pkg.json dependencies.
- expect(pkgJson.dependencies).toEqual({ 'cordova-android' : '^5.0.0', 'cordova-browser' : '^4.1.0' });
+ expect(pkgJson.dependencies).toEqual({ 'cordova-android': '^5.0.0', 'cordova-browser': '^4.1.0' });
expect(pkgJson.dependencies['cordova-android']).toEqual('^5.0.0');
expect(pkgJson.dependencies['cordova-browser']).toEqual('^4.1.0');
}).fail(function (err) {
@@ -762,7 +762,7 @@ describe('update config.xml to use the variable found in pkg.json', function ()
emptyPlatformList().then(function () {
// Run cordova prepare.
- return prepare({'fetch': true, 'save':true});
+ return prepare({'fetch': true, 'save': true});
}).then(function () {
// Delete any previous caches of require(package.json).
pkgJson = cordova_util.requireNoCache(pkgJsonPath);
@@ -1199,7 +1199,7 @@ describe('update config.xml to include the plugin that is in pkg.json', function
emptyPlatformList().then(function () {
// Run cordova prepare.
- return prepare({'fetch': false, 'save':true});
+ return prepare({'fetch': false, 'save': true});
}).then(function () {
// Delete any previous caches of require(package.json).
pkgJson = cordova_util.requireNoCache(pkgJsonPath);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org