Skip to content

Commit f224339

Browse files
Assert interface fix (#1601)
* fix: notOwnInclude, notDeepOwnInclude description * fix: assert method example code fix
1 parent d504573 commit f224339

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: lib/chai/interface/assert.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ assert.ownInclude = function(exp, inc, msg) {
10931093
/**
10941094
* ### .notOwnInclude(haystack, needle, [message])
10951095
*
1096-
* Asserts that 'haystack' includes 'needle'.
1096+
* Asserts that 'haystack' does not include 'needle'.
10971097
* Can be used to assert the absence of a subset of properties in an
10981098
* object while ignoring inherited properties.
10991099
*
@@ -1136,7 +1136,7 @@ assert.deepOwnInclude = function(exp, inc, msg) {
11361136
/**
11371137
* ### .notDeepOwnInclude(haystack, needle, [message])
11381138
*
1139-
* Asserts that 'haystack' includes 'needle'.
1139+
* Asserts that 'haystack' does not include 'needle'.
11401140
* Can be used to assert the absence of a subset of properties in an
11411141
* object while ignoring inherited properties and checking for deep equality.
11421142
*
@@ -1633,7 +1633,7 @@ assert.hasAnyKeys = function (obj, keys, msg) {
16331633
* assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']);
16341634
* assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337]);
16351635
* assert.hasAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']);
1636-
* assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']);
1636+
* assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']);
16371637
*
16381638
* @name hasAllKeys
16391639
* @param {unknown} object
@@ -1659,8 +1659,8 @@ assert.hasAllKeys = function (obj, keys, msg) {
16591659
* assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337});
16601660
* assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}]);
16611661
* assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']);
1662-
* assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}]);
1663-
* assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']);
1662+
* assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}]);
1663+
* assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']);
16641664
*
16651665
* @name containsAllKeys
16661666
* @param {unknown} object
@@ -1684,7 +1684,7 @@ assert.containsAllKeys = function (obj, keys, msg) {
16841684
* assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']);
16851685
* assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'});
16861686
* assert.doesNotHaveAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']);
1687-
* assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']);
1687+
* assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{one: 'two'}, 'example']);
16881688
*
16891689
* @name doesNotHaveAnyKeys
16901690
* @param {unknown} object
@@ -1708,7 +1708,7 @@ assert.doesNotHaveAnyKeys = function (obj, keys, msg) {
17081708
* assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']);
17091709
* assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'});
17101710
* assert.doesNotHaveAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']);
1711-
* assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']);
1711+
* assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{one: 'two'}, 'example']);
17121712
*
17131713
* @name doesNotHaveAllKeys
17141714
* @param {unknown} object

0 commit comments

Comments
 (0)