@@ -8,10 +8,11 @@ const { test, variants, prepareServer } = setupTest({ devtoolsJson } as {
88 devtoolsJson ?: typeof devtoolsJson ;
99} ) ;
1010
11- test . concurrent . for ( variants ) ( 'default - %s' , async ( variant , { page, ...ctx } ) => {
11+ const kitOnly = variants . filter ( ( v ) => v . includes ( 'kit' ) ) ;
12+ test . concurrent . for ( kitOnly ) ( 'default - %s' , async ( variant , { page, ...ctx } ) => {
1213 const cwd = await ctx . run ( variant , { devtoolsJson : { } } ) ;
1314
14- const { close } = await prepareServer ( { cwd, page } ) ;
15+ const { close } = await prepareServer ( { cwd, page, previewCommand : null ! } ) ;
1516 // kill server process when we're done
1617 ctx . onTestFinished ( async ( ) => await close ( ) ) ;
1718
@@ -26,25 +27,3 @@ test.concurrent.for(variants)('default - %s', async (variant, { page, ...ctx })
2627 // Check if it's called
2728 expect ( viteContent ) . toContain ( `devtoolsJson()` ) ;
2829} ) ;
29-
30- test . concurrent . for ( variants ) (
31- 'without selecting the addon specifically - %s' ,
32- async ( variant , { page, ...ctx } ) => {
33- const cwd = await ctx . run ( variant , { } ) ;
34-
35- const { close } = await prepareServer ( { cwd, page } ) ;
36- // kill server process when we're done
37- ctx . onTestFinished ( async ( ) => await close ( ) ) ;
38-
39- const ext = variant . includes ( 'ts' ) ? 'ts' : 'js' ;
40- const viteFile = path . resolve ( cwd , `vite.config.${ ext } ` ) ;
41- const viteContent = fs . readFileSync ( viteFile , 'utf8' ) ;
42-
43- // Check if we have the import part
44- expect ( viteContent ) . toContain ( `import devtoolsJson from` ) ;
45- expect ( viteContent ) . toContain ( `vite-plugin-devtools-json` ) ;
46-
47- // Check if it's called
48- expect ( viteContent ) . toContain ( `devtoolsJson()` ) ;
49- }
50- ) ;
0 commit comments