From 41d91c4e46b1b5ea5e0f3a035f6b2a7b315758f7 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sun, 6 May 2018 09:15:30 +0200 Subject: [PATCH] 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 --- test/parallel/test-console.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-console.js b/test/parallel/test-console.js index 64df389be691c6..b044f5761ef224 100644 --- a/test/parallel/test-console.js +++ b/test/parallel/test-console.js @@ -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);