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 B7D02200C1C for ; Wed, 11 Jan 2017 03:30:27 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B6B37160B4B; Wed, 11 Jan 2017 02:30:27 +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 7D6BA160B3D for ; Wed, 11 Jan 2017 03:30:26 +0100 (CET) Received: (qmail 38174 invoked by uid 500); 11 Jan 2017 02:30:18 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 37060 invoked by uid 99); 11 Jan 2017 02:30:18 -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; Wed, 11 Jan 2017 02:30:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DAF9ADFDD1; Wed, 11 Jan 2017 02:30:17 +0000 (UTC) From: stevengill To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-lib pull request #510: Fixjasmine : CB:12018 - updating tests in cor... Content-Type: text/plain Message-Id: <20170111023017.DAF9ADFDD1@git1-us-west.apache.org> Date: Wed, 11 Jan 2017 02:30:17 +0000 (UTC) archived-at: Wed, 11 Jan 2017 02:30:27 -0000 Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/510#discussion_r95500826 --- Diff: cordova-lib/spec-cordova/plugin.spec.js --- @@ -216,91 +229,110 @@ describe('plugin end-to-end', function() { expect(defaultPluginPreferences.REQUIRED).toBe('NO'); return removePlugin(org_test_defaultvariables); }) - .fail(errorHandler.errorCallback) - .fin(done); - }); + .fail(function(err) { + console.error(err); + expect(err).toBeUndefined(); + }) + .fin(done); + }, 30000); - it('should successfully add a plugin when specifying CLI variables', function(done) { + it('Test 006 : should successfully add a plugin when specifying CLI variables', function(done) { addPlugin(path.join(pluginsDir, org_test_defaultvariables), org_test_defaultvariables, {cli_variables: { REQUIRED:'yes', REQUIRED_ANDROID:'yes'}}, done) - .fail(errorHandler.errorCallback) + .fail(function(err) { + console.error(err); + expect(err).toBeUndefined(); + }) .fin(done); - }); + }, 30000); - it('should not check npm info when using the searchpath flag', function(done) { + it('Test 007 : should not check npm info when using the searchpath flag', function(done) { mockPluginFetch(npmInfoTestPlugin, path.join(pluginsDir, npmInfoTestPlugin)); - spyOn(registry, 'info'); - addPlugin(npmInfoTestPlugin, npmInfoTestPlugin, {searchpath: pluginsDir}, done) + return addPlugin(npmInfoTestPlugin, npmInfoTestPlugin, {searchpath: pluginsDir}, done) .then(function() { expect(registry.info).not.toHaveBeenCalled(); - - var fetchOptions = plugman.raw.fetch.mostRecentCall.args[2]; - expect(fetchOptions.searchpath).toBeDefined(); + var fetchOptions = plugman.raw.fetch.calls.mostRecent().args[2]; + expect(fetchOptions.searchpath[0]).toExist(); + }) + .fail(function(err) { + console.error(err); + expect(err).toBeUndefined(); }) - .fail(errorHandler.errorCallback) .fin(done); - }); + }, 30000); - it('should not check npm info when using the noregistry flag', function(done) { + it('Test 008 : should not check npm info when using the noregistry flag', function(done) { mockPluginFetch(npmInfoTestPlugin, path.join(pluginsDir, npmInfoTestPlugin)); spyOn(registry, 'info'); addPlugin(npmInfoTestPlugin, npmInfoTestPlugin, {noregistry:true}, done) .then(function() { expect(registry.info).not.toHaveBeenCalled(); - var fetchOptions = plugman.raw.fetch.mostRecentCall.args[2]; + var fetchOptions = plugman.raw.fetch.calls.mostRecent().args[2]; expect(fetchOptions.noregistry).toBeTruthy(); }) - .fail(errorHandler.errorCallback) + .fail(function(err) { + console.error(err); --- End diff -- same as 155 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org