Skip to content

Commit

Permalink
test: refactor test-cli-syntax
Browse files Browse the repository at this point in the history
Switch assert.equal to assert.strictEqual.

PR-URL: #10057
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Exlipse7 authored and MylesBorins committed Dec 20, 2016
1 parent 91d27ce commit 08cc269
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/parallel/test-cli-syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ var syntaxArgs = [
var c = spawnSync(node, _args, {encoding: 'utf8'});

// no output should be produced
assert.equal(c.stdout, '', 'stdout produced');
assert.equal(c.stderr, '', 'stderr produced');
assert.equal(c.status, 0, 'code == ' + c.status);
assert.strictEqual(c.stdout, '', 'stdout produced');
assert.strictEqual(c.stderr, '', 'stderr produced');
assert.strictEqual(c.status, 0, 'code == ' + c.status);
});
});

Expand All @@ -51,13 +51,13 @@ var syntaxArgs = [
var c = spawnSync(node, _args, {encoding: 'utf8'});

// no stdout should be produced
assert.equal(c.stdout, '', 'stdout produced');
assert.strictEqual(c.stdout, '', 'stdout produced');

// stderr should have a syntax error message
var match = c.stderr.match(/^SyntaxError: Unexpected identifier$/m);
assert(match, 'stderr incorrect');

assert.equal(c.status, 1, 'code == ' + c.status);
assert.strictEqual(c.status, 1, 'code == ' + c.status);
});
});

Expand All @@ -74,12 +74,12 @@ var syntaxArgs = [
var c = spawnSync(node, _args, {encoding: 'utf8'});

// no stdout should be produced
assert.equal(c.stdout, '', 'stdout produced');
assert.strictEqual(c.stdout, '', 'stdout produced');

// stderr should have a module not found error message
var match = c.stderr.match(/^Error: Cannot find module/m);
assert(match, 'stderr incorrect');

assert.equal(c.status, 1, 'code == ' + c.status);
assert.strictEqual(c.status, 1, 'code == ' + c.status);
});
});

0 comments on commit 08cc269

Please sign in to comment.