fix(snapshot): allow inline snapshot calls on same location with same snapshot #13907
ci.yml
on: pull_request
Diff: node-latest, ubuntu-latest
13s
Lint: node-latest, ubuntu-latest
2m 40s
Matrix: test-browser
Matrix: test
Annotations
10 errors
Build&Test: node-22, ubuntu-latest
Process completed with exit code 1.
|
test/inline-multiple-calls.test.ts > different:
test/snapshots/test/inline-multiple-calls.test.ts#L126
AssertionError: expected '\n⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯\n\n …' to contain '\nError: toMatchInlineSnapshot with d…'
- Expected
+ Received
- Error: toMatchInlineSnapshot with different snapshots cannot be called at the same location
-
- Expected: ""test1""
- Received: ""test2""
+ ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
+
+ FAIL different.test.ts > test1
+ Error: Snapshot `test1 1` mismatched
+ ❯ different.test.ts:5:19
+ 3| test('test1', () => {
+ 4| for (const test1 of ["test1", "test2"]) {
+ 5| expect(test1).toMatchInlineSnapshot()
+ | ^
+ 6| }
+ 7| })
+
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
+
❯ test/inline-multiple-calls.test.ts:126:25
|
Build&Test: node-20, macos-latest
Process completed with exit code 1.
|
test/inline-multiple-calls.test.ts > different:
test/snapshots/test/inline-multiple-calls.test.ts#L126
AssertionError: expected '\n⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯\n\n …' to contain '\nError: toMatchInlineSnapshot with d…'
- Expected
+ Received
- Error: toMatchInlineSnapshot with different snapshots cannot be called at the same location
-
- Expected: ""test1""
- Received: ""test2""
+ ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
+
+ FAIL different.test.ts > test1
+ Error: Snapshot `test1 1` mismatched
+ ❯ different.test.ts:5:19
+ 3| test('test1', () => {
+ 4| for (const test1 of ["test1", "test2"]) {
+ 5| expect(test1).toMatchInlineSnapshot()
+ | ^
+ 6| }
+ 7| })
+
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
+
❯ test/inline-multiple-calls.test.ts:126:25
|
Build&Test: node-20, ubuntu-latest
Process completed with exit code 1.
|
test/inline-multiple-calls.test.ts > different:
test/snapshots/test/inline-multiple-calls.test.ts#L126
AssertionError: expected '\n⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯\n\n …' to contain '\nError: toMatchInlineSnapshot with d…'
- Expected
+ Received
- Error: toMatchInlineSnapshot with different snapshots cannot be called at the same location
-
- Expected: ""test1""
- Received: ""test2""
+ ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
+
+ FAIL different.test.ts > test1
+ Error: Snapshot `test1 1` mismatched
+ ❯ different.test.ts:5:19
+ 3| test('test1', () => {
+ 4| for (const test1 of ["test1", "test2"]) {
+ 5| expect(test1).toMatchInlineSnapshot()
+ | ^
+ 6| }
+ 7| })
+
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
+
❯ test/inline-multiple-calls.test.ts:126:25
|
Build&Test: node-18, ubuntu-latest
Process completed with exit code 1.
|
Browsers: node-20, windows-latest
Process completed with exit code 1.
|
test/inline-multiple-calls.test.ts > different:
test/snapshots/test/inline-multiple-calls.test.ts#L126
AssertionError: expected '\n⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯\n\n …' to contain '\nError: toMatchInlineSnapshot with d…'
- Expected
+ Received
- Error: toMatchInlineSnapshot with different snapshots cannot be called at the same location
-
- Expected: ""test1""
- Received: ""test2""
+ ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
+
+ FAIL different.test.ts > test1
+ Error: Snapshot `test1 1` mismatched
+ ❯ different.test.ts:5:19
+ 3| test('test1', () => {
+ 4| for (const test1 of ["test1", "test2"]) {
+ 5| expect(test1).toMatchInlineSnapshot()
+ | ^
+ 6| }
+ 7| })
+
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
+
❯ test/inline-multiple-calls.test.ts:126:25
|
Build&Test: node-20, windows-latest
Process completed with exit code 1.
|