Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D4CB5200D2D for ; Fri, 27 Oct 2017 17:52:33 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D36421609E9; Fri, 27 Oct 2017 15:52:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2692E160BDC for ; Fri, 27 Oct 2017 17:52:32 +0200 (CEST) Received: (qmail 91705 invoked by uid 500); 27 Oct 2017 15:52:32 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 91696 invoked by uid 99); 27 Oct 2017 15:52:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Oct 2017 15:52:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DFD4ADF9C2; Fri, 27 Oct 2017 15:52:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: audreyso@apache.org To: commits@cordova.apache.org Date: Fri, 27 Oct 2017 15:52:30 -0000 Message-Id: In-Reply-To: <0e22374de38c492f99b0589b5b23a172@git.apache.org> References: <0e22374de38c492f99b0589b5b23a172@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/4] cordova-lib git commit: lint fixes archived-at: Fri, 27 Oct 2017 15:52:34 -0000 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 Authored: Sat Oct 21 11:33:27 2017 +1100 Committer: Jarrad Whitaker 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