This repository was archived by the owner on Aug 29, 2025. It is now read-only.
test: replace chai-spies with sinon#374
Merged
n-riesco merged 2 commits intoplotly:masterfrom Feb 16, 2018
Merged
Conversation
* I tried to use sinon-chai but it throws the same error as chai-spies. Fixes plotly#373
Contributor
Author
|
@tarzzz I've added a fix for the test failures in the specs for elasticsearch. |
Contributor
|
👍 I will give it a look tomorrow.. !! |
5b3e898 to
8b563fa
Compare
Merged
tarzzz
reviewed
Feb 16, 2018
test/backend/QueryScheduler.spec.js
Outdated
| return wait(3.25 * refreshInterval * 1000) | ||
| .then(() => { | ||
| expect(spy1).to.have.been.called.exactly(3); | ||
| assert(spy1.calledThrice, 'job1 should have been called yet three times'); |
Contributor
There was a problem hiding this comment.
job1 should have been called ~~yet~~~ three times
tarzzz
reviewed
Feb 16, 2018
test/backend/QueryScheduler.spec.js
Outdated
| .then(() => { | ||
| expect(spy1).to.have.been.called.exactly(3); | ||
| expect(spy1).to.have.been.called.always.with.exactly( | ||
| assert(spy1.calledThrice, 'job1 should have been called yet three times'); |
Contributor
There was a problem hiding this comment.
job1 should have been called ~~~yet~~~ three times
tarzzz
reviewed
Feb 16, 2018
test/backend/QueryScheduler.spec.js
Outdated
|
|
||
| expect(spy2).to.have.been.called.exactly(3); | ||
| expect(spy2).to.have.been.called.always.with.exactly( | ||
| assert(spy2.calledThrice, 'job2 should have been called yet three times'); |
Contributor
There was a problem hiding this comment.
job2 should have been called ~~~yet~~~ three times
tarzzz
approved these changes
Feb 16, 2018
Contributor
tarzzz
left a comment
There was a problem hiding this comment.
Minor 🐐 , .. 💃 once they are taken care of.. !!
* Do not test pri, rep, store.size and docs.deleted, as they may change over time. * Do not overwrite elasticsearchConnections. * Added script `test-unit-nock` to run all the tests affected by nock. * Do not use import with nock, otherwise other test units won't be able to reactivate nock. * Ensure nock is enabled before running specs with the mocked servers. * Disable nock after running the specs with mocked servers.
8b563fa to
b35700d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed failures in CircleCI caused by
chai-spies.I tried to use sinon-chai but it throws the same error as chai-spies.
Fixes #373
@tarzzz would you review this PR?