diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 6dad99d68..2b1abf4c1 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -179,13 +179,17 @@ module.exports = function (chai, _) { /** * ### .include(value) * - * The `include` and `contain` assertions can be used as either property - * based language chains or as methods to assert the inclusion of an object - * in an array or a substring in a string. When used as language chains, - * they toggle the `contains` flag for the `keys` assertion. + * The `include` and `contain` assertions can be used as methods to assert + * the inclusion of a value in an array, a substring in a string, or a subset + * of properties in an object. * * expect([1,2,3]).to.include(2); * expect('foobar').to.contain('foo'); + * expect({ foo: 'bar', hello: 'universe' }).to.include({ foo: 'bar' }); + * + * These assertions can also be used as property based language chains, + * enabling the `contains` flag for the `keys` assertion. For instance: + * * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo'); * * @name include