Skip to content
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

refactor(test): Chai assert header matching #1925

Merged
merged 4 commits into from Feb 22, 2020

Conversation

mastermatt
Copy link
Member

No description provided.

@mastermatt mastermatt added this to the Migrate to Mocha/Chai milestone Feb 21, 2020
const matchHeaderSpy = sinon.stub().returns(false)
// TODO: It's surprising that this function receives a number instead of
// a string. Probably this behavior should be changed.
matchHeaderSpy.withArgs(456).returns(true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, it seems like this test should assert this call is the one that’s made.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, I missed that. updated.

message: 'Mocks not yet satisfied',
})

expect(scope.isDone()).to.be.false()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

const matchHeaderSpy = sinon.stub().returns(false)
// TODO: It's surprising that this function receives a number instead of
// a string. Probably this behavior should be changed.
matchHeaderSpy.withArgs(456).returns(true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

@mastermatt mastermatt merged commit 9cbb707 into nock:master Feb 22, 2020
@mastermatt mastermatt deleted the 1305/header-match/chai branch February 22, 2020 15:19
@github-actions
Copy link

github-actions bot commented Mar 1, 2020

🎉 This PR is included in version 12.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants