Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Conversation

@n-riesco
Copy link
Contributor

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

* I tried to use sinon-chai but it throws the same error as chai-spies.

Fixes plotly#373
@n-riesco
Copy link
Contributor Author

@tarzzz I've added a fix for the test failures in the specs for elasticsearch.

@tarzzz
Copy link
Contributor

tarzzz commented Feb 14, 2018

👍 I will give it a look tomorrow.. !!

@n-riesco n-riesco force-pushed the test/replace-chai-spies-with-sinon branch 5 times, most recently from 5b3e898 to 8b563fa Compare February 14, 2018 19:56
@n-riesco n-riesco mentioned this pull request Feb 15, 2018
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');
Copy link
Contributor

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

.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');
Copy link
Contributor

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


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');
Copy link
Contributor

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

Copy link
Contributor

@tarzzz tarzzz left a 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.
@n-riesco n-riesco force-pushed the test/replace-chai-spies-with-sinon branch from 8b563fa to b35700d Compare February 16, 2018 09:23
@n-riesco n-riesco merged commit 3e671f7 into plotly:master Feb 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants