Skip to content

Commit

Permalink
test: fix assertion in test-console
Browse files Browse the repository at this point in the history
Move the assertion after the second call to `console.time()` to
actually make sure that the time is not reset.

Refs: #20442

PR-URL: #20557
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
lpinca authored and addaleax committed May 14, 2018
1 parent 3746187 commit 60ef7d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ console.timeEnd(NaN);
console.time('test');
const time = console._times.get('test');
setTimeout(() => {
assert.deepStrictEqual(console._times.get('test'), time);
common.expectWarning(
'Warning',
'Label \'test\' already exists for console.time()',
common.noWarnCode);
console.time('test');
assert.deepStrictEqual(console._times.get('test'), time);
console.timeEnd('test');
}, 1);

Expand Down

0 comments on commit 60ef7d1

Please sign in to comment.