1
1
import { expect , test } from 'vitest'
2
2
3
3
import { createApp } from '../src/create-app.js'
4
- import { createTestEnvironment } from './test-utilities.js'
4
+ import { cleanupOutput , createTestEnvironment } from './test-utilities.js'
5
5
6
6
test ( 'code router in javascript on npm' , async ( ) => {
7
7
const projectName = 'TEST'
@@ -25,6 +25,7 @@ test('code router in javascript on npm', async () => {
25
25
environment,
26
26
} ,
27
27
)
28
+ cleanupOutput ( output )
28
29
await expect ( JSON . stringify ( output , null , 2 ) ) . toMatchFileSnapshot (
29
30
'./snapshots/cra/cr-js-npm.json' ,
30
31
)
@@ -52,6 +53,7 @@ test('code router in typescript on npm', async () => {
52
53
environment,
53
54
} ,
54
55
)
56
+ cleanupOutput ( output )
55
57
await expect ( JSON . stringify ( output , null , 2 ) ) . toMatchFileSnapshot (
56
58
'./snapshots/cra/cr-ts-npm.json' ,
57
59
)
@@ -79,6 +81,7 @@ test('file router on npm', async () => {
79
81
environment,
80
82
} ,
81
83
)
84
+ cleanupOutput ( output )
82
85
await expect ( JSON . stringify ( output , null , 2 ) ) . toMatchFileSnapshot (
83
86
'./snapshots/cra/fr-ts-npm.json' ,
84
87
)
@@ -106,6 +109,7 @@ test('file router with tailwind on npm', async () => {
106
109
environment,
107
110
} ,
108
111
)
112
+ cleanupOutput ( output )
109
113
await expect ( JSON . stringify ( output , null , 2 ) ) . toMatchFileSnapshot (
110
114
'./snapshots/cra/fr-ts-tw-npm.json' ,
111
115
)
0 commit comments