[GitHub] cordova-lib pull request #582: CB-12361 : added tests for plugin/search.js

2017-08-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cordova-lib/pull/582


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



[GitHub] cordova-lib pull request #582: CB-12361 : added tests for plugin/search.js

2017-08-11 Thread stevengill
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 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



[GitHub] cordova-lib pull request #582: CB-12361 : added tests for plugin/search.js

2017-08-11 Thread stevengill
Github user stevengill commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/582#discussion_r132736117
  
--- 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);
--- End diff --

Don't think you need console.log(e) since you console.error two lines below


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



[GitHub] cordova-lib pull request #582: CB-12361 : added tests for plugin/search.js

2017-07-21 Thread audreyso
GitHub user audreyso opened a pull request:

https://github.com/apache/cordova-lib/pull/582

CB-12361 : added tests for plugin/search.js



### Platforms affected


### What does this PR do?

Added tests for plugin/search.js.

### What testing has been done on this change?


### Checklist
- [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
- [X] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
- [X] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/audreyso/cordova-lib CB-12361-12-plugin

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-lib/pull/582.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #582


commit 175513b5eaad88059b0e47257025f122da76a0a5
Author: Audrey So 
Date:   2017-07-20T20:23:11Z

CB-12361 : added tests for plugin/search.js




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