chaijs/chai — pull request #313 by cjqed (2014-12-01 04:14:28+00:00)
Title: Added the 'any' and 'all' flags for 'keys' assertion, with 'all' being the default behavior

This should solve #254 and the unintuitive behavior of the `keys` assertion. See the tests for more details, but in a nutshell, the following pass:

```
expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');
expect({ foo: 1, bar: 2 }).to.contain.all.keys(['bar', 'foo']);
```

And the following fail:

```
expect({ foo: 1, bar: 2 }).to.not.have.all.keys(['foo', 'bar']);
expect({ foo: 1, bar: 2 }).to.not.have.any.keys(['foo', 'baz']);
```

To preserve backward compatibility, using neither any nor all will default you to all. Since no previous tests failed, I'm assuming this worked but let me know if anything sticks out to you.

Thanks!