cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevengill <...@git.apache.org>
Subject [GitHub] cordova-lib pull request #582: CB-12361 : added tests for plugin/search.js
Date Fri, 11 Aug 2017 17:04:50 GMT
Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/582#discussion_r132736159
  
    --- Diff: spec/cordova/plugin/search.spec.js ---
    @@ -44,7 +44,36 @@ describe('cordova/plugin/search', function () {
                 console.error(e);
             }).done(done);
         });
    -    it('should open a link to cordova.apache.org/plugins if no plugins are provided as
parameter');
    -    it('should open a link to cordova.apache.org/plugins, providing the plugins passed
in as a query-string parameter');
    -    it('should fire the after_plugin_search hook');
    +
    +    it('should open a link to cordova.apache.org/plugins if no plugins are provided as
parameter', function (done) {
    +        var opts = {important: 'options', plugins: []};
    +        search(hook_mock, opts).then(function () {
    +            expect(opener_mock).toHaveBeenCalled();
    +        }).fail(function (e) {
    +            console.log(e);
    +            fail('fail handler unexpectedly invoked');
    +            console.error(e);
    +        }).done(done);
    +    });
    +
    +    it('should open a link to cordova.apache.org/plugins, providing the plugins passed
in as a query-string parameter', function (done) {
    +        var opts = {important: 'options', plugins: ['cordova-plugin-camera', 'cordova-plugin-splashscreen']};
    +        search(hook_mock, opts).then(function () {
    +            expect(opener_mock).toHaveBeenCalled();
    +        }).fail(function (e) {
    +            console.log(e);
    --- End diff --
    
    same


---
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


Mime
View raw message