You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by meirotstein <gi...@git.apache.org> on 2016/12/26 14:34:02 UTC

[GitHub] cordova-plugin-contacts pull request #145: CB-12300: fix tests failure when ...

GitHub user meirotstein opened a pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/145

    CB-12300: fix tests failure when running it using jasmine-node

    ### Platforms affected
    None
    
    ### What does this PR do?
    This PR allows to run this project jasmine tests using [jasmine-node](https://github.com/mhevery/jasmine-node)
    In nodejs convention when calling async test done() function with parameter it consider it as error object and the test fails.
    In this project on the following tests the done function is eventually called with a parameter:
    contacts.spec.25
    contacts.spec.28
    contacts.spec.29
    
    If you'll run these tests with jasmine-node you'll get the following error:
    `Message:
         [object Object]
       Stacktrace:
         undefined`
    
     This PR fixes it by sending own callback that calls done as expected
    
    ### What testing has been done on this change?
    Run the test :)
    
    ### 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-xxxx 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/meirotstein/cordova-plugin-contacts master

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

    https://github.com/apache/cordova-plugin-contacts/pull/145.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 #145
    
----
commit 8843cd3f04205cb2be6b57ccae6fd3ec804410f2
Author: Meir Rotstein <me...@rotstein.co.il>
Date:   2016-12-26T14:14:44Z

    fix tests failure when running it using jasmine-node

----


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


[GitHub] cordova-plugin-contacts issue #145: CB-12300: fix tests failure when running...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-contacts/pull/145
  
    Cordova CI Build has completed successfully.
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-contacts/pull/145/commits/8843cd3f04205cb2be6b57ccae6fd3ec804410f2)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69/)
    
    | Builder Name  | Console Output | Test Report | Device Logs  |
    |     :---:     |     :---:      |   :---:     |     :---:    |
    | [Windows 8.1 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-8.1-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-8.1-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-8.1-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-8.1-store/artifact/) |
    | [Windows 10  Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-10-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-10-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-10-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-10-store/artifact/) |
    | [Windows 8.1 Phone]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-8.1-phone/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-8.1-phone/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-8.1-phone/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=windows-8.1-phone/artifact/) |
    | [iOS]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=ios/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=ios/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=ios/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=ios/artifact/) |
    | [Android]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=android/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=android/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=android/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/69//PLATFORM=android/artifact/) |
     



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


[GitHub] cordova-plugin-contacts issue #145: CB-12300: fix tests failure when running...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-contacts/pull/145
  
    Cordova CI Build has completed successfully.
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-contacts/pull/145/commits/88192bf17fe0dc790ae705a7a4f14d016b48f254)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70/)
    
    | Builder Name  | Console Output | Test Report | Device Logs  |
    |     :---:     |     :---:      |   :---:     |     :---:    |
    | [Windows 8.1 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-8.1-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-8.1-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-8.1-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-8.1-store/artifact/) |
    | [Windows 10  Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-10-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-10-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-10-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-10-store/artifact/) |
    | [Windows 8.1 Phone]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-8.1-phone/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-8.1-phone/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-8.1-phone/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=windows-8.1-phone/artifact/) |
    | [iOS]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=ios/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=ios/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=ios/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=ios/artifact/) |
    | [Android]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=android/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=android/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=android/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-contacts-pr/70//PLATFORM=android/artifact/) |
     



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


[GitHub] cordova-plugin-contacts issue #145: CB-12300: fix tests failure when running...

Posted by meirotstein <gi...@git.apache.org>.
Github user meirotstein commented on the issue:

    https://github.com/apache/cordova-plugin-contacts/pull/145
  
    My pleasure \U0001f603 


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


[GitHub] cordova-plugin-contacts issue #145: CB-12300: fix tests failure when running...

Posted by alsorokin <gi...@git.apache.org>.
Github user alsorokin commented on the issue:

    https://github.com/apache/cordova-plugin-contacts/pull/145
  
    Thanks you!


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


[GitHub] cordova-plugin-contacts issue #145: CB-12300: fix tests failure when running...

Posted by alsorokin <gi...@git.apache.org>.
Github user alsorokin commented on the issue:

    https://github.com/apache/cordova-plugin-contacts/pull/145
  
    Hey @meirotstein thanks for your contribution!
    
    Could you please clarify the way you are running tests using `jasmine-node` so I could test your patch?



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


[GitHub] cordova-plugin-contacts pull request #145: CB-12300: fix tests failure when ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-plugin-contacts/pull/145


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


[GitHub] cordova-plugin-contacts issue #145: CB-12300: fix tests failure when running...

Posted by meirotstein <gi...@git.apache.org>.
Github user meirotstein commented on the issue:

    https://github.com/apache/cordova-plugin-contacts/pull/145
  
    Hi @alsorokin 
    
    I have wrapped the defineAutoTests method with my own 'describe' and executed jasmine-node via command line - 
    you can see how I use it here (depending a forked fixed version) :
    https://github.com/meirotstein/cordova-plugin-contacts-mock/blob/master/spec/unitSpec.js
    
    Execution:
    ```
    jasmine-node spec
    ```
    
    These tests are also ran by [travis](https://travis-ci.org/meirotstein/cordova-plugin-contacts-mock/builds)
    
    Thanks!
     


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


[GitHub] cordova-plugin-contacts issue #145: CB-12300: fix tests failure when running...

Posted by alsorokin <gi...@git.apache.org>.
Github user alsorokin commented on the issue:

    https://github.com/apache/cordova-plugin-contacts/pull/145
  
    Oh, I see.
    Please add Jira issue number to the commit message as follows: `CB-12300: fix tests failure when running it using jasmine-node`, then it will be good to merge.


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