MCPcopy Index your code
hub / github.com/adobe/react-spectrum / toContainObject

Function toContainObject

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected