[
https://issues.apache.org/jira/browse/CB-12300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15778422#comment-15778422
]
ASF GitHub Bot commented on CB-12300:
-------------------------------------
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 <[email protected]>
Date: 2016-12-26T14:14:44Z
fix tests failure when running it using jasmine-node
----
> Allow run cordova-plugin-contacts with jasmine-node
> ---------------------------------------------------
>
> Key: CB-12300
> URL: https://issues.apache.org/jira/browse/CB-12300
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Meir Rotstein
> Priority: Minor
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> In nodejs convention when calling async test done() function with parameter
> it consider it as error object and the test fails.
> In the cordova-plugin-contacts 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
> jasmine-node: https://github.com/mhevery/jasmine-node
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]