Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: complete console.assert() coverage
There is one condition in the `console.assert()` code that is not
tested currently. Add a test to confirm that `console.assert(false)`
does not include a `:` in its output.
  • Loading branch information
Trott committed Mar 20, 2019
commit 9e7f8fc976c8b4a8c78aec4ad6745b0bdbc52d5f
3 changes: 3 additions & 0 deletions test/parallel/test-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ console.assert(false, '%s should', 'console.assert', 'not throw');
assert.strictEqual(errStrings[errStrings.length - 1],
'Assertion failed: console.assert should not throw\n');

console.assert(false);
assert.strictEqual(errStrings[errStrings.length - 1], 'Assertion failed\n');

console.assert(true, 'this should not throw');

console.assert(true);
Expand Down