Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/510#discussion_r95500848
  
    --- 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);
    +            expect(err).toBeUndefined();
    +        })
             .fin(done);
    -    });
    +    }, 30000);
     
    -    it('should not check npm info when fetching from a Git repository', 
function(done) {
    +    it('Test 009 : should not check npm info when fetching from a Git 
repository', function(done) {
             spyOn(registry, 'info');
             addPlugin(testGitPluginRepository, testGitPluginId, {}, done)
             .then(function() {
                 expect(registry.info).not.toHaveBeenCalled();
             })
    -        .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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to