From 18d38390e78bc0b97385724f94d106c6184f393d Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Mon, 3 Oct 2022 13:08:56 +0300 Subject: [PATCH] test_runner: fix `duration_ms` to be milliseconds PR-URL: https://github.com/nodejs/node/pull/44450 Backport-PR-URL: https://github.com/nodejs/node/pull/44873 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Antoine du Hamel Reviewed-By: Franziska Hinkelmann Reviewed-By: Rich Trott Reviewed-By: Minwoo Jung --- lib/internal/test_runner/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index 006cd0fd5f77d5..544c09206f3f0b 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -615,8 +615,8 @@ class Test extends AsyncResource { } #duration() { - // Duration is recorded in BigInt nanoseconds. Convert to seconds. - return Number(this.endTime - this.startTime) / 1_000_000_000; + // Duration is recorded in BigInt nanoseconds. Convert to milliseconds. + return Number(this.endTime - this.startTime) / 1_000_000; } report() {