Skip to content

Commit 60ef7d1

Browse files
lpincaaddaleax
authored andcommitted
test: fix assertion in test-console
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>
1 parent 3746187 commit 60ef7d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-console.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ console.timeEnd(NaN);
142142
console.time('test');
143143
const time = console._times.get('test');
144144
setTimeout(() => {
145-
assert.deepStrictEqual(console._times.get('test'), time);
146145
common.expectWarning(
147146
'Warning',
148147
'Label \'test\' already exists for console.time()',
149148
common.noWarnCode);
150149
console.time('test');
150+
assert.deepStrictEqual(console._times.get('test'), time);
151151
console.timeEnd('test');
152152
}, 1);
153153

0 commit comments

Comments
 (0)