Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Use 0 seconds as a default test file time execution #36

Merged
merged 1 commit into from
Apr 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/knapsack-pro-jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ const onSuccess: onQueueSuccessType = async (queueTestFiles: TestFile[]) => {
? testFilePath.replace(`${projectPath}\\`, '').replace(/\\/g, '/')
: testFilePath.replace(`${projectPath}/`, '');
const timeExecutionMiliseconds = end - start;
// 0.1s default time when not recorded timing
const timeExecution =
timeExecutionMiliseconds > 0 ? timeExecutionMiliseconds / 1000 : 0.1;
timeExecutionMiliseconds > 0 ? timeExecutionMiliseconds / 1000 : 0.0;

return {
path,
Expand Down