Skip to content

Commit 82c03a8

Browse files
committed
Update test
1 parent 847da72 commit 82c03a8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/cli.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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 = /(404|Not found)/;
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);

0 commit comments

Comments
 (0)