From 63f727ba8520679cabe2b06439ea658228431840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sat, 4 Apr 2015 13:55:34 -0400 Subject: [PATCH 1/2] Fix super minor typo in an example --- lib/chai/core/assertions.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 8c3b0d322..b2f9dd627 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -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}}]); * From a62ac240e54aa84dee5615b92f25d5bd6c0c3296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sat, 4 Apr 2015 13:55:46 -0400 Subject: [PATCH 2/2] Remove trailing whitespaces --- lib/chai/core/assertions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index b2f9dd627..f34e2f512 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -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'); * @@ -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'); @@ -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');