-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
to.have.been.called.with() throws an error #78
Comments
Duplicates #71 Update: |
@Bartosz-D3V I've published |
bors bot
added a commit
to IMA-WorldHealth/bhima
that referenced
this issue
Dec 1, 2017
2321: Write unit tests for topic.js r=jeremielodi a=jniles This PR adds tests for the topic.js library, a pub-sub system based on ioredis. First, I have added a global setup function and teardown function (which is empty currently) for the server-unit tests. These functions pre-load the environmental variables and setup up Chai with spies and promises. These are located in `setup.js` in the `test/server-unit` directory. See mochajs/mocha#1460 (comment) for the suggestion for this code. Second, I've added unit tests to the topic library. They use a spy plugin for chai to detect when callbacks have been fired. Unfortunately, due to bugs with the `chai-spies` library (chaijs/chai-spies#78) I've had to use [chai-spies-next](https://www.npmjs.com/package/chai-spies-next). In order to wait for the asynchronous code to complete, each spied function returns a promise that determines when the testing should proceed. If no actionhappens withing mocha's default timeout, the test fails. Closes #2314.
Fixed in 1.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I have a small issue with chai spies.
When invoking the above code I receive an error:
I don't have any problems with running other functions so far like to.have.been.called.once/twice etc.
Is it a known issue?
I use chai version 4.0.2 and chai-spies version 0.7.1
The text was updated successfully, but these errors were encountered: