Skip to content

Instantly share code, notes, and snippets.

Last active November 25, 2016 08:43
What would you like to do?
Avoiding multiple asserts
//easy way to check if object has the expected "shape":
it('tests something', function() {
var expectedObject = {
some: 'prop',
values: 'here'
var result = doStuff();
assert.deepEqual(result, expectedObject);
//but if we want to check the object has some properties,
//where it might have more props than those, we can use...
//or alternatively, something like
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment