You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/assertions/object.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,12 @@ expect({ a: 1 }, 'not to be empty');
89
89
> {object} to have keys {array}
90
90
> {object} to have properties {array}
91
91
> {object} to have props {array}
92
+
> {object} to include keys {array}
93
+
> {object} to include properties {array}
94
+
> {object} to include props {array}
95
+
> {object} to contain keys {array}
96
+
> {object} to contain properties {array}
97
+
> {object} to contain props {array}
92
98
93
99
**Success**:
94
100
@@ -117,6 +123,12 @@ expect({ a: 1 }, 'not to have keys', ['a', 'b']);
117
123
> {object} to have key {keypath}
118
124
> {object} to have property {keypath}
119
125
> {object} to have prop {keypath}
126
+
> {object} to include key {keypath}
127
+
> {object} to include property {keypath}
128
+
> {object} to include prop {keypath}
129
+
> {object} to contain key {keypath}
130
+
> {object} to contain property {keypath}
131
+
> {object} to contain prop {keypath}
120
132
121
133
Tests whether an object has a property at the specified keypath using dot or bracket notation. This assertion supports complex _keypath_ traversal including nested properties, array indices, and quoted keys.
0 commit comments