mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
feat(jsdoc-test-matchers): add toHaveOwnProperty matcher
This commit is contained in:
parent
8cb97046f7
commit
f3f73b22e8
@ -30,6 +30,9 @@ addMatchers({
|
||||
|
||||
return valueName === otherName;
|
||||
},
|
||||
toHaveOwnProperty(other, value) {
|
||||
return Object.hasOwn(value, other);
|
||||
},
|
||||
// The objects in `value` must have all of the keys and values from the corresponding objects in
|
||||
// `other`. The object in `value` can have additional properties as well. For example, if
|
||||
// `other[0]` is `{ a: 1 }`, and `value[0]` is `{ a: 1, b: 2 }`, then the objects match.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user