@@ -6,7 +6,7 @@ const touchFile = require('../utils/touch-file');
66
77tap . test ( 'should pass unknown args to node binary' , t => {
88 spawn ( '--expose_gc gc.js foo' , out => {
9- t . is ( out . trim ( ) , 'foo function' ) ;
9+ t . equal ( out . trim ( ) , 'foo function' ) ;
1010 return { exit : t . end . bind ( t ) } ;
1111 } ) ;
1212} ) ;
@@ -79,39 +79,39 @@ tap.test('should run async code un uncaughtException handlers', t => {
7979
8080tap . test ( 'should ignore caught errors' , t => {
8181 spawn ( 'catch-no-such-module.js' , out => {
82- t . like ( out , / C a u g h t / ) ;
82+ t . match ( out , / C a u g h t / ) ;
8383 return { exit : t . end . bind ( t ) } ;
8484 } ) ;
8585} ) ;
8686
8787tap . test ( 'should not show up in argv' , t => {
8888 spawn ( 'argv.js foo' , out => {
8989 const argv = JSON . parse ( out . replace ( / ' / g, '"' ) ) ;
90- t . like ( argv [ 0 ] , / .* ?n o d e ( j s | \. e x e ) ? $ / ) ;
91- t . is ( argv [ 1 ] , 'argv.js' ) ;
92- t . is ( argv [ 2 ] , 'foo' ) ;
90+ t . match ( argv [ 0 ] , / .* ?n o d e ( j s | \. e x e ) ? $ / ) ;
91+ t . equal ( argv [ 1 ] , 'argv.js' ) ;
92+ t . equal ( argv [ 2 ] , 'foo' ) ;
9393 return { exit : t . end . bind ( t ) } ;
9494 } ) ;
9595} ) ;
9696
9797tap . test ( 'should pass through the exit code' , t => {
9898 spawn ( 'exit.js' ) . on ( 'exit' , code => {
99- t . is ( code , 101 ) ;
99+ t . equal ( code , 101 ) ;
100100 t . end ( ) ;
101101 } ) ;
102102} ) ;
103103
104104tap . test ( 'should conceal the wrapper' , t => {
105105 // require.main should be main.js not wrap.js!
106106 spawn ( 'main.js' ) . on ( 'exit' , code => {
107- t . is ( code , 0 ) ;
107+ t . equal ( code , 0 ) ;
108108 t . end ( ) ;
109109 } ) ;
110110} ) ;
111111
112112tap . test ( 'should relay stdin' , t => {
113113 const p = spawn ( 'echo.js' , out => {
114- t . is ( out , 'foo' ) ;
114+ t . equal ( out , 'foo' ) ;
115115 return { exit : t . end . bind ( t ) } ;
116116 } ) ;
117117 p . stdin . write ( 'foo' ) ;
@@ -160,7 +160,7 @@ tap.test('should kill the forked processes', t => {
160160
161161tap . test ( 'should *not* set NODE_ENV' , t => {
162162 spawn ( 'env.js' , out => {
163- t . notLike ( out , / d e v e l o p m e n t / ) ;
163+ t . notMatch ( out , / d e v e l o p m e n t / ) ;
164164 return { exit : t . end . bind ( t ) } ;
165165 } ) ;
166166} ) ;
@@ -211,7 +211,7 @@ tap.test('Logs timestamp by default', t => {
211211 touchFile ( 'message.js' ) ;
212212 return out2 => {
213213 if ( out2 . match ( / R e s t a r t i n g / ) ) {
214- t . like ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
214+ t . match ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
215215 return { exit : t . end . bind ( t ) } ;
216216 }
217217 } ;
@@ -225,7 +225,7 @@ tap.test('Supports require from the command-line (ts-node/register)', t => {
225225 touchFile ( 'message.js' ) ;
226226 return out2 => {
227227 if ( out2 . match ( / R e s t a r t i n g / ) ) {
228- t . like ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
228+ t . match ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
229229 return { exit : t . end . bind ( t ) } ;
230230 }
231231 } ;
@@ -239,7 +239,7 @@ tap.test('Uses ts-node/register for .ts files through config file (also the defa
239239 touchFile ( 'message.js' ) ;
240240 return out2 => {
241241 if ( out2 . match ( / R e s t a r t i n g / ) ) {
242- t . like ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
242+ t . match ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
243243 return { exit : t . end . bind ( t ) } ;
244244 }
245245 } ;
@@ -253,7 +253,7 @@ tap.test('Supports ECMAScript modules', t => {
253253 touchFile ( 'message.mjs' ) ;
254254 return out2 => {
255255 if ( out2 . match ( / R e s t a r t i n g / ) ) {
256- t . like ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
256+ t . match ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
257257 return { exit : t . end . bind ( t ) } ;
258258 }
259259 } ;
@@ -269,7 +269,7 @@ tap.test('Supports ECMAScript modules with experimental-specifier-resolution', t
269269 touchFile ( 'message.js' ) ;
270270 return out2 => {
271271 if ( out2 . match ( / R e s t a r t i n g / ) ) {
272- t . like ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
272+ t . match ( out2 , / \[ I N F O \] \d { 2 } : \d { 2 } : \d { 2 } R e s t a r t i n g / ) ;
273273 return { exit : t . end . bind ( t ) } ;
274274 }
275275 } ;
0 commit comments