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

Add documentation for sinon.assert.match #1180

Merged

Conversation

mroderick
Copy link
Member

This is a PR for master, it is a solution to #1147.


describe('example', function(){
it('should fail for mismatching strings', function() {
sinon.assert.match('hello', 'world');

Choose a reason for hiding this comment

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

Perhaps it would be worth using an example involving fuzzy matching, since this is what makes sinon.match useful compared to say, node or chai assertions?

eg:

// Test value of `x` property, ignore `y`
sinon.assert.match({x:1,y:2}, sinon.match({x:1}))

Copy link
Member Author

Choose a reason for hiding this comment

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

I've pushed a new commit with an improved example based on your feedback @robertknight

@mroderick mroderick force-pushed the add-documentation-for-assert.match branch from 23bc604 to 4875211 Compare November 9, 2016 16:43
@fatso83 fatso83 merged commit f6e7916 into sinonjs:master Nov 18, 2016
@mroderick mroderick deleted the add-documentation-for-assert.match branch October 11, 2017 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants