Skip to content

Conversation

@lee-houghton
Copy link

I like this library, it makes writing assertions much DRYer! But I did miss being able to assert that two things are equal and having the error message include the values of the things that were different, rather than just the names. I added an assert.equal and assert.strictEqual, and thought it might be useful to make a pull request...

I've extracted the source code extraction into a fail function, which takes an optional extraMessage parameter to give a bit more information about the error. I've only implemented assert.equal and assert.strictEqual, though I'm sure something like assert.deepEqual would be useful too. I've used util.inspect for stringifying the values.

lee-houghton and others added 3 commits February 14, 2015 15:07
…xtraction, but including the values of the things which were not the same.
I can't type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant