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

Fix minimalist typo in doc example #417

Merged
merged 2 commits into from Apr 5, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 13 additions & 13 deletions lib/chai/core/assertions.js
Expand Up @@ -93,7 +93,7 @@ module.exports = function (chai, _) {
* ### .any
*
* Sets the `any` flag, (opposite of the `all` flag)
* later used in the `keys` assertion.
* later used in the `keys` assertion.
*
* expect(foo).to.have.any.keys('bar', 'baz');
*
Expand All @@ -110,7 +110,7 @@ module.exports = function (chai, _) {
/**
* ### .all
*
* Sets the `all` flag (opposite of the `any` flag)
* Sets the `all` flag (opposite of the `any` flag)
* later used by the `keys` assertion.
*
* expect(foo).to.have.all.keys('bar', 'baz');
Expand Down Expand Up @@ -767,7 +767,7 @@ module.exports = function (chai, _) {
* green: { tea: 'matcha' }
* , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]
* };
*
*
* expect(deepObj).to.have.deep.property('green.tea', 'matcha');
* expect(deepObj).to.have.deep.property('teas[1]', 'matcha');
* expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');
Expand Down Expand Up @@ -1038,30 +1038,30 @@ module.exports = function (chai, _) {
* ### .keys(key1, [key2], [...])
*
* Asserts that the target contains any or all of the passed-in keys.
* Use in combination with `any`, `all`, `contains`, or `have` will affect
* Use in combination with `any`, `all`, `contains`, or `have` will affect
* what will pass.
*
* When used in conjunction with `any`, at least one key that is passed
* in must exist in the target object. This is regardless whether or not
*
* When used in conjunction with `any`, at least one key that is passed
* in must exist in the target object. This is regardless whether or not
* the `have` or `contain` qualifiers are used. Note, either `any` or `all`
* should be used in the assertion. If neither are used, the assertion is
* defaulted to `all`.
*
* When both `all` and `contain` are used, the target object must have at
*
* When both `all` and `contain` are used, the target object must have at
* least all of the passed-in keys but may have more keys not listed.
*
*
* When both `all` and `have` are used, the target object must both contain
* all of the passed-in keys AND the number of keys in the target object must
* match the number of keys passed in (in other words, a target object must
* match the number of keys passed in (in other words, a target object must
* have all and only all of the passed-in keys).
*
*
* expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');
* expect({ foo: 1, bar: 2 }).to.have.any.keys('foo');
* expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz');
* expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']);
* expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6});
* expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']);
* expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo', 7});
* expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7});
* expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);
* expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys([{'bar': 6}}]);
*
Expand Down