tj / should.js

BDD style assertions for node.js -- test framework agnostic
MIT License
2.75k stars 194 forks source link

add support for specifying property values w/ have.properties #164

Closed dtao closed 10 years ago

dtao commented 10 years ago

I'd like to be able to make assertions about just some of an object's properties in a more concise way.

For example:

var object = {
  foo: 1,
  bar: 2,
  baz: 3
};

// Maybe I don't care about bar for this particular test
object.should.have.properties({
  foo: 1,
  bar: 2
});

This change provides that functionality.

dtao commented 10 years ago

Never mind; I just noticed this functionality is available with include. Closing now.