MCPcopy
hub / github.com/jestjs/jest / testNotToMatchSnapshots

Function testNotToMatchSnapshots

packages/expect/src/__tests__/matchers.test.js:2134–2145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2132 };
2133
2134 const testNotToMatchSnapshots = tuples => {
2135 for (const [n1, n2] of tuples) {
2136 it(`{pass: true} expect(${stringify(n1)}).toMatchObject(${stringify(
2137 n2,
2138 )})`, () => {
2139 jestExpect(n1).toMatchObject(n2);
2140 expect(() =>
2141 jestExpect(n1).not.toMatchObject(n2),
2142 ).toThrowErrorMatchingSnapshot();
2143 });
2144 }
2145 };
2146
2147 const testToMatchSnapshots = tuples => {
2148 for (const [n1, n2] of tuples) {

Callers 1

matchers.test.jsFile · 0.85

Calls 5

stringifyFunction · 0.85
expectFunction · 0.85
toMatchObjectMethod · 0.80
itFunction · 0.50

Tested by

no test coverage detected