@@ -36,16 +36,16 @@ test('should keep vitest exports stable', () => {
3636 expect ( defaultBrowserPort ) . toBeDefined ( ) ;
3737} ) ;
3838
39- test ( 'vitePlugins returns empty array when VP_COMMAND is unset' , ( ) => {
39+ test ( 'vitePlugins returns undefined when VP_COMMAND is unset' , ( ) => {
4040 delete process . env . VP_COMMAND ;
4141 const result = vitePlugins ( ( ) => [ { name : 'test' } ] ) ;
42- expect ( result ) . toEqual ( [ ] ) ;
42+ expect ( result ) . toBeUndefined ( ) ;
4343} ) ;
4444
45- test ( 'vitePlugins returns empty array when VP_COMMAND is empty string' , ( ) => {
45+ test ( 'vitePlugins returns undefined when VP_COMMAND is empty string' , ( ) => {
4646 process . env . VP_COMMAND = '' ;
4747 const result = vitePlugins ( ( ) => [ { name : 'test' } ] ) ;
48- expect ( result ) . toEqual ( [ ] ) ;
48+ expect ( result ) . toBeUndefined ( ) ;
4949} ) ;
5050
5151test . each ( [ 'dev' , 'build' , 'test' , 'preview' ] ) (
@@ -58,11 +58,11 @@ test.each(['dev', 'build', 'test', 'preview'])(
5858) ;
5959
6060test . each ( [ 'lint' , 'fmt' , 'check' , 'pack' , 'install' , 'run' ] ) (
61- 'vitePlugins returns empty array when VP_COMMAND is %s' ,
61+ 'vitePlugins returns undefined when VP_COMMAND is %s' ,
6262 ( cmd ) => {
6363 process . env . VP_COMMAND = cmd ;
6464 const result = vitePlugins ( ( ) => [ { name : 'my-plugin' } ] ) ;
65- expect ( result ) . toEqual ( [ ] ) ;
65+ expect ( result ) . toBeUndefined ( ) ;
6666 } ,
6767) ;
6868
@@ -76,10 +76,10 @@ test('vitePlugins supports async callback', async () => {
7676 expect ( await result ) . toEqual ( [ { name : 'async-plugin' } ] ) ;
7777} ) ;
7878
79- test ( 'vitePlugins returns empty array for async callback when skipped' , ( ) => {
79+ test ( 'vitePlugins returns undefined for async callback when skipped' , ( ) => {
8080 process . env . VP_COMMAND = 'lint' ;
8181 const result = vitePlugins ( async ( ) => {
8282 return [ { name : 'async-plugin' } ] ;
8383 } ) ;
84- expect ( result ) . toEqual ( [ ] ) ;
84+ expect ( result ) . toBeUndefined ( ) ;
8585} ) ;
0 commit comments