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

Function toContainObject

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected