Skip to content

Commit fa4e047

Browse files
committed
fix: stabilizing unit test snapshots
1 parent 24b6210 commit fa4e047

File tree

6 files changed

+60
-36
lines changed

6 files changed

+60
-36
lines changed

tests/cra.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect, test } from 'vitest'
22

33
import { createApp } from '../src/create-app.js'
4-
import { createTestEnvironment } from './test-utilities.js'
4+
import { cleanupOutput, createTestEnvironment } from './test-utilities.js'
55

66
test('code router in javascript on npm', async () => {
77
const projectName = 'TEST'
@@ -25,6 +25,7 @@ test('code router in javascript on npm', async () => {
2525
environment,
2626
},
2727
)
28+
cleanupOutput(output)
2829
await expect(JSON.stringify(output, null, 2)).toMatchFileSnapshot(
2930
'./snapshots/cra/cr-js-npm.json',
3031
)
@@ -52,6 +53,7 @@ test('code router in typescript on npm', async () => {
5253
environment,
5354
},
5455
)
56+
cleanupOutput(output)
5557
await expect(JSON.stringify(output, null, 2)).toMatchFileSnapshot(
5658
'./snapshots/cra/cr-ts-npm.json',
5759
)
@@ -79,6 +81,7 @@ test('file router on npm', async () => {
7981
environment,
8082
},
8183
)
84+
cleanupOutput(output)
8285
await expect(JSON.stringify(output, null, 2)).toMatchFileSnapshot(
8386
'./snapshots/cra/fr-ts-npm.json',
8487
)
@@ -106,6 +109,7 @@ test('file router with tailwind on npm', async () => {
106109
environment,
107110
},
108111
)
112+
cleanupOutput(output)
109113
await expect(JSON.stringify(output, null, 2)).toMatchFileSnapshot(
110114
'./snapshots/cra/fr-ts-tw-npm.json',
111115
)

0 commit comments

Comments
 (0)