@@ -16,30 +16,30 @@ import assert from 'node:assert'
16
16
import { test , describe , beforeEach } from 'node:test'
17
17
import '../build/globals.js'
18
18
19
- describe ( 'win32' , ( ) => {
19
+ const _describe = process . platform === 'win32' ? describe : describe . skip
20
+
21
+ _describe ( 'win32' , ( ) => {
20
22
beforeEach ( ( ) => {
21
23
$ . verbose = false
22
24
} )
23
25
24
- if ( process . platform === 'win32' ) {
25
- test ( 'should work with windows-specific commands' , async ( ) => {
26
- const p = await $ `echo $0` // Bash is first by default.
27
- assert . match ( p . stdout , / b a s h / )
28
- await within ( async ( ) => {
29
- $ . shell = which . sync ( 'powershell.exe' )
30
- $ . quote = quotePowerShell
31
- const p = await $ `get-host`
32
- assert . match ( p . stdout , / P o w e r S h e l l / )
33
- } )
26
+ test ( 'should work with windows-specific commands' , async ( ) => {
27
+ const p = await $ `echo $0` // Bash is first by default.
28
+ assert . match ( p . stdout , / b a s h / )
29
+ await within ( async ( ) => {
30
+ $ . shell = which . sync ( 'powershell.exe' )
31
+ $ . quote = quotePowerShell
32
+ const p = await $ `get-host`
33
+ assert . match ( p . stdout , / P o w e r S h e l l / )
34
34
} )
35
+ } )
35
36
36
- test ( 'quotePowerShell works' , async ( ) => {
37
- await within ( async ( ) => {
38
- $ . shell = which . sync ( 'powershell.exe' )
39
- $ . quote = quotePowerShell
40
- const p = await $ `echo ${ `Windows 'rulez!'` } `
41
- assert . match ( p . stdout , / W i n d o w s ' r u l e z ! ' / )
42
- } )
37
+ test ( 'quotePowerShell works' , async ( ) => {
38
+ await within ( async ( ) => {
39
+ $ . shell = which . sync ( 'powershell.exe' )
40
+ $ . quote = quotePowerShell
41
+ const p = await $ `echo ${ `Windows 'rulez!'` } `
42
+ assert . match ( p . stdout , / W i n d o w s ' r u l e z ! ' / )
43
43
} )
44
- }
44
+ } )
45
45
} )
0 commit comments