File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ import type { TestFunction } from 'vitest'
22import type { commands } from '../../src/commands'
33
44import { spawnSync } from 'node:child_process'
5-
65import { fileURLToPath } from 'node:url'
6+
7+ import { isWindows } from 'std-env'
78import { describe , expect , it } from 'vitest'
89
910const fixtureDir = fileURLToPath ( new URL ( '../../playground' , import . meta. url ) )
@@ -33,15 +34,15 @@ describe('commands', () => {
3334 const res = spawnSync ( 'pnpm' , [ 'nuxi' ] , {
3435 cwd : fixtureDir ,
3536 } )
36- expect ( res . status ) . toBe ( 1 )
37+ expect ( res . status ) . toBe ( isWindows ? null : 1 )
3738 expect ( res . stderr . toString ( ) ) . toBe ( '[error] No command specified.\n' )
3839 } )
3940
4041 it ( 'throws error if wrong command is provided' , async ( ) => {
4142 const res = spawnSync ( 'pnpm' , [ 'nuxi' , 'foo' ] , {
4243 cwd : fixtureDir ,
4344 } )
44- expect ( res . status ) . toBe ( 1 )
45+ expect ( res . status ) . toBe ( isWindows ? null : 1 )
4546 expect ( res . stderr . toString ( ) ) . toBe ( '[error] Unknown command `foo`\n' )
4647 } )
4748
You can’t perform that action at this time.
0 commit comments