Skip to content

Commit

Permalink
fix(ui): incorrect duration time in vitest ui (#3945)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing authored Aug 14, 2023
1 parent dbf0e97 commit 351399f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ui/client/composables/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export const testsTodo = computed(() => testsIgnore.value.filter(f => f.mode ===
export const totalTests = computed(() => testsFailed.value.length + testsSuccess.value.length)
export const time = computed(() => {
const t = getTests(tests.value).reduce((acc, t) => {
if (t.result?.duration)
acc += t.result.duration

acc += Math.max(0, t.collectDuration || 0)
acc += Math.max(0, t.setupDuration || 0)
acc += Math.max(0, t.result?.duration || 0)
return acc
}, 0)

Expand Down

0 comments on commit 351399f

Please sign in to comment.