Skip to content

Commit 77ae436

Browse files
committed
support array in properties matcher
1 parent cbbec0a commit 77ae436

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

packages/jest-snapshot/src/__tests__/__snapshots__/printSnapshot.test.ts.snap

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@ exports[`matcher error toMatchNamedSnapshot received value must be an object (nu
9090
Received has value: <r>null</>
9191
`;
9292

93-
exports[`matcher error toMatchSnapshot Expected properties must be an object (array) 1`] = `
94-
<d>expect(</><r>received</><d>).</>toMatchSnapshot<d>(</><g>properties</><d>)</>
95-
96-
<b>Matcher error</>: Expected <g>properties</> must be an object
97-
98-
Expected properties has type: array
99-
Expected properties has value: <g>[]</>
100-
`;
101-
10293
exports[`matcher error toMatchSnapshot Expected properties must be an object (non-null) 1`] = `
10394
<d>expect(</><r>received</><d>).</>toMatchSnapshot<d>(</><g>properties</><d>)</>
10495

packages/jest-snapshot/src/__tests__/printSnapshot.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -311,20 +311,6 @@ describe('matcher error', () => {
311311
}).toThrowErrorMatchingSnapshot();
312312
});
313313

314-
test('Expected properties must be an object (array)', () => {
315-
const context = {
316-
isNot: false,
317-
promise: '',
318-
} as Context;
319-
const properties: Array<unknown> = [];
320-
const snapshotName =
321-
'toMatchNamedSnapshot Expected properties must be an object (array)';
322-
323-
expect(() => {
324-
toMatchNamedSnapshot.call(context, received, snapshotName, properties);
325-
}).toThrowErrorMatchingSnapshot();
326-
});
327-
328314
describe('received value must be an object', () => {
329315
const context = {
330316
currentTestName: '',

0 commit comments

Comments
 (0)