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: https://github.com/nodejs/node/pull/20442 PR-URL: https://github.com/nodejs/node/pull/20557 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
parent
37461878d0
commit
60ef7d1a8f
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user