-
-
Notifications
You must be signed in to change notification settings - Fork 275
test: replace chai-spies with sinon #374
test: replace chai-spies with sinon #374
Conversation
* I tried to use sinon-chai but it throws the same error as chai-spies. Fixes plotly#373
|
@tarzzz I've added a fix for the test failures in the specs for elasticsearch. |
|
👍 I will give it a look tomorrow.. !! |
5b3e898 to
8b563fa
Compare
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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
job1 should have been called ~~yet~~~ three times
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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
job1 should have been called ~~~yet~~~ three times
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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
job2 should have been called ~~~yet~~~ three times
tarzzz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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?