11import { expect , test } from 'vitest'
22
33import { createApp } from '../src/create-app.js'
4- import { createTestEnvironment } from './test-utilities.js'
4+ import { cleanupOutput , createTestEnvironment } from './test-utilities.js'
55
66test ( '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