mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-29 16:57:00 +08:00
Always round test duration to milliseconds
Bug: 408145209 Change-Id: I7246d08a8ff033c081a141b49ded7070f977ddd6 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6429854 Commit-Queue: Eric Leese <leese@chromium.org> Reviewed-by: Philip Pfaffe <pfaffe@chromium.org> Reviewed-by: Liviu Rau <liviurau@chromium.org>
This commit is contained in:
committed by
Devtools-frontend LUCI CQ
parent
c71b0b48ef
commit
9876f54da0
@@ -67,7 +67,7 @@ export const ResultsDBReporter = function(
|
||||
const status = skipped ? 'SKIP' : success ? 'PASS' : 'FAIL';
|
||||
let duration = '.001s';
|
||||
if (startTime < endTime) {
|
||||
duration = ((endTime - startTime) * .001).toString() + 's';
|
||||
duration = ((endTime - startTime) * .001).toFixed(3) + 's';
|
||||
}
|
||||
|
||||
const consoleLog = capturedLog.map(({type, log}) => `${type.toUpperCase()}: ${log}`);
|
||||
|
||||
@@ -134,7 +134,7 @@ class ResultsDbReporter extends Mocha.reporters.Spec {
|
||||
const testRetry = ((test as unknown) as TestRetry);
|
||||
const result = {
|
||||
testId: ResultsDb.sanitizedTestId(testId),
|
||||
duration: `${(test.duration || 0) * .001}s`,
|
||||
duration: `${((test.duration || 1) * .001).toFixed(3)}s`,
|
||||
tags: [{key: 'run', value: String(testRetry.currentRetry() + 1)}],
|
||||
};
|
||||
const hookName = this.maybeHook(test);
|
||||
|
||||
Reference in New Issue
Block a user