@@ -5,7 +5,7 @@ const path = require('path');
55const assert = require ( 'assert' ) ;
66const runScript = require ( '..' ) ;
77
8- describe ( 'test/ runscript.test.js' , ( ) => {
8+ describe ( 'runscript.test.js' , ( ) => {
99 it ( 'should run `$ node -v`' , ( ) => {
1010 return runScript ( 'node -v' ) ;
1111 } ) ;
@@ -62,20 +62,20 @@ describe('test/runscript.test.js', () => {
6262 it ( 'should reject on timeout (stderr)' , ( ) => {
6363 return runScript ( `node ${ path . join ( __dirname , 'fixtures/timeout-stderr.js' ) } ` , {
6464 stdio : 'pipe' ,
65- } , { timeout : 1200 } )
65+ } , { timeout : 1500 } )
6666 . catch ( err => {
6767 console . log ( err ) ;
6868 assert ( err . name === 'RunScriptTimeoutError' ) ;
69- assert ( err . stdio . stderr . toString ( ) === 'timer start\necho every 500ms \necho every 500ms \n' ) ;
69+ assert ( err . stdio . stderr . toString ( ) === 'timer start\necho every 600ms \necho every 600ms \n' ) ;
7070 } ) ;
7171 } ) ;
7272
7373 it ( 'should normal exit before timeout' , ( ) => {
7474 return runScript ( `node ${ path . join ( __dirname , 'fixtures/timeout-and-exit.js' ) } ` , {
7575 stdio : 'pipe' ,
76- } , { timeout : 1300 } )
76+ } , { timeout : 1800 } )
7777 . then ( stdio => {
78- assert ( stdio . stderr . toString ( ) === 'timer start\necho every 500ms \necho every 500ms \nexit\n' ) ;
78+ assert ( stdio . stderr . toString ( ) === 'timer start\necho every 600ms \necho every 600ms \nexit\n' ) ;
7979 } ) ;
8080 } ) ;
8181
@@ -170,26 +170,6 @@ describe('test/runscript.test.js', () => {
170170 } ) ;
171171 } ) ;
172172
173- it ( 'should compile ts without error' , ( ) => {
174- return runScript ( 'tsc -p ./ts/tsconfig.json' , {
175- stdio : 'pipe' ,
176- cwd : path . join ( __dirname , 'fixtures' ) ,
177- } ) . then ( stdio => {
178- assert ( ! stdio . stderr ) ;
179-
180- return runScript ( 'node ./ts/check.js' , {
181- stdio : 'pipe' ,
182- cwd : path . join ( __dirname , 'fixtures' ) ,
183- } ) . then ( stdio => {
184- assert ( ! stdio . stderr ) ;
185- const stdout = stdio . stdout . toString ( ) ;
186- assert ( stdout ) ;
187- assert ( stdout . match ( / v \d + \. \d + \. \d + / ) ) ;
188- assert ( stdout . match ( / O p t i o n s : / ) ) ;
189- } ) ;
190- } ) ;
191- } ) ;
192-
193173 if ( process . platform === 'win32' ) {
194174 it ( 'should run relative path .\\node_modules\\.bin\\autod' , ( ) => {
195175 return runScript ( '.\\node_modules\\.bin\\autod -V' , {
0 commit comments