MCPcopy Create free account
hub / github.com/adobe/react-spectrum / toContainObject

Function toContainObject

scripts/setupTests.js:83–99  ·  view source on GitHub ↗
(received, argument)

Source from the content-addressed store, hash-verified

81
82expect.extend({
83 toContainObject(received, argument) {
84 const pass = this.equals(received, expect.arrayContaining([expect.objectContaining(argument)]));
85
86 if (pass) {
87 return {
88 message: () =>
89 `expected ${this.utils.printReceived(received)} not to contain object ${this.utils.printExpected(argument)}`,
90 pass: true
91 };
92 } else {
93 return {
94 message: () =>
95 `expected ${this.utils.printReceived(received)} to contain object ${this.utils.printExpected(argument)}`,
96 pass: false
97 };
98 }
99 }
100});
101
102failTestOnConsoleWarn();

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected