File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,14 +123,14 @@ describe('cli', function() {
123123 this . timeout ( 5000 ) ;
124124
125125 // Add a garbage dependency to the package.json
126- pkgJson . dependencies [ badPkgName ] = '=12345. 0.1.3' ;
126+ pkgJson . dependencies [ badPkgName ] = '=0.1.3' ;
127127 fs . writeFileSync ( pkgJsonPath , JSON . stringify ( pkgJson , null , 2 ) ) ;
128128
129129 // Make sure that there are some logs about the error
130- let testFn = ( res , err , done ) => {
130+ let testFn = ( res , stderr , done ) => {
131131 const notFoundRegex = / ( 4 0 4 | N o t f o u n d ) / ;
132- assert ( notFoundRegex . test ( res ) , `Did not print 404/Not found in "${ res } "` ) ;
133- assert . notEqual ( res . indexOf ( badPkgName ) , - 1 ) ;
132+ assert ( notFoundRegex . test ( stderr ) , `Did not print 404/Not found in "${ res } "` ) ;
133+ assert ( stderr . includes ( badPkgName ) ) ;
134134 done ( ) ;
135135 } ;
136136 testCliCall ( [ 'start' ] , testFn , done ) ;
You can’t perform that action at this time.
0 commit comments