@@ -84,7 +84,8 @@ test('should update missing snapshots', async ({ runInlineTest }, testInfo) => {
84
84
`
85
85
} ) ;
86
86
87
- expect ( result . exitCode ) . toBe ( 0 ) ;
87
+ expect ( result . exitCode ) . toBe ( 1 ) ;
88
+ expect ( result . output ) . toContain ( 'Error: A snapshot is not provided, generating new baseline.' ) ;
88
89
89
90
expect ( stripAnsi ( result . output ) . replace ( / \\ / g, '/' ) ) . toContain ( `New baselines created for:
90
91
@@ -129,7 +130,7 @@ test('should update multiple missing snapshots', async ({ runInlineTest }, testI
129
130
`
130
131
} ) ;
131
132
132
- expect ( result . exitCode ) . toBe ( 0 ) ;
133
+ expect ( result . exitCode ) . toBe ( 1 ) ;
133
134
134
135
expect ( stripAnsi ( result . output ) . replace ( / \\ / g, '/' ) ) . toContain ( `New baselines created for:
135
136
@@ -188,7 +189,7 @@ test('should generate baseline with regex', async ({ runInlineTest }, testInfo)
188
189
`
189
190
} ) ;
190
191
191
- expect ( result . exitCode ) . toBe ( 0 ) ;
192
+ expect ( result . exitCode ) . toBe ( 1 ) ;
192
193
const patchPath = testInfo . outputPath ( 'test-results/rebaselines.patch' ) ;
193
194
const data = fs . readFileSync ( patchPath , 'utf-8' ) ;
194
195
expect ( trimPatch ( data ) ) . toBe ( `diff --git a/a.spec.ts b/a.spec.ts
@@ -249,7 +250,7 @@ test('should generate baseline with special characters', async ({ runInlineTest
249
250
`
250
251
} ) ;
251
252
252
- expect ( result . exitCode ) . toBe ( 0 ) ;
253
+ expect ( result . exitCode ) . toBe ( 1 ) ;
253
254
const patchPath = testInfo . outputPath ( 'test-results/rebaselines.patch' ) ;
254
255
const data = fs . readFileSync ( patchPath , 'utf-8' ) ;
255
256
expect ( trimPatch ( data ) ) . toBe ( `diff --git a/a.spec.ts b/a.spec.ts
@@ -314,7 +315,7 @@ test('should update missing snapshots in tsx', async ({ runInlineTest }, testInf
314
315
` ,
315
316
} ) ;
316
317
317
- expect ( result . exitCode ) . toBe ( 0 ) ;
318
+ expect ( result . exitCode ) . toBe ( 1 ) ;
318
319
const patchPath = testInfo . outputPath ( 'test-results/rebaselines.patch' ) ;
319
320
const data = fs . readFileSync ( patchPath , 'utf-8' ) ;
320
321
expect ( trimPatch ( data ) ) . toBe ( `diff --git a/src/button.test.tsx b/src/button.test.tsx
@@ -370,7 +371,7 @@ test('should update multiple files', async ({ runInlineTest }, testInfo) => {
370
371
` ,
371
372
} ) ;
372
373
373
- expect ( result . exitCode ) . toBe ( 0 ) ;
374
+ expect ( result . exitCode ) . toBe ( 1 ) ;
374
375
375
376
expect ( stripAnsi ( result . output ) . replace ( / \\ / g, '/' ) ) . toContain ( `New baselines created for:
376
377
@@ -430,7 +431,7 @@ test('should generate baseline for input values', async ({ runInlineTest }, test
430
431
`
431
432
} ) ;
432
433
433
- expect ( result . exitCode ) . toBe ( 0 ) ;
434
+ expect ( result . exitCode ) . toBe ( 1 ) ;
434
435
const patchPath = testInfo . outputPath ( 'test-results/rebaselines.patch' ) ;
435
436
const data = fs . readFileSync ( patchPath , 'utf-8' ) ;
436
437
expect ( trimPatch ( data ) ) . toBe ( `diff --git a/a.spec.ts b/a.spec.ts
@@ -470,7 +471,7 @@ test('should update when options are specified', async ({ runInlineTest }, testI
470
471
`
471
472
} ) ;
472
473
473
- expect ( result . exitCode ) . toBe ( 0 ) ;
474
+ expect ( result . exitCode ) . toBe ( 1 ) ;
474
475
const patchPath = testInfo . outputPath ( 'test-results/rebaselines.patch' ) ;
475
476
const data = fs . readFileSync ( patchPath , 'utf-8' ) ;
476
477
expect ( trimPatch ( data ) ) . toBe ( `diff --git a/a.spec.ts b/a.spec.ts
0 commit comments