File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,26 @@ describe('spawn', () => {
2626
2727 it ( 'default - string' , ( ) => spawn ( catCommand , fixturePath ) . should . become ( fixture ) ) ;
2828
29+ it ( 'default - empty argument and options' , async ( ) => {
30+ if ( isWindows ) {
31+ const out = await spawn ( 'ver' ) ;
32+ out . trim ( ) . startsWith ( 'Microsoft Windows' ) . should . eql ( true ) ;
33+ } else {
34+ const out = await spawn ( 'uname' ) ;
35+ out . trim ( ) . should . eql ( 'Linux' ) ;
36+ }
37+ } ) ;
38+
39+ it ( 'default - options and empty argument' , async ( ) => {
40+ if ( isWindows ) {
41+ const out = await spawn ( 'chdir' , { cwd : __dirname } ) ;
42+ out . trim ( ) . should . eql ( __dirname ) ;
43+ } else {
44+ const out = await spawn ( 'pwd' , { cwd : __dirname } ) ;
45+ out . trim ( ) . should . eql ( __dirname ) ;
46+ }
47+ } ) ;
48+
2949 it ( 'command is required' , ( ) => {
3050 spawn . should . throw ( 'command is required!' ) ;
3151 } ) ;
You can’t perform that action at this time.
0 commit comments