Skip to content
Closed
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
11 changes: 8 additions & 3 deletions packages/vitest/src/node/reporters/dot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class DotReporter extends BaseReporter {

onWatcherRerun(files: string[], trigger?: string): void {
this.tests.clear()
this.finishedTests.clear()
this.renderer?.start()
super.onWatcherRerun(files, trigger)
}
Expand Down Expand Up @@ -111,7 +112,7 @@ export class DotReporter extends BaseReporter {
return
}

const finishedTests = Array.from(this.tests).filter(entry => entry[1] !== 'pending')
const finishedTests = Array.from(this.tests).filter(([id]) => this.finishedTests.has(id))

if (finishedTests.length < columns) {
return
Expand Down Expand Up @@ -178,14 +179,18 @@ function formatTests(states: TestCaseState[]): string {
continue
}

output += currentIcon.color(currentIcon.char.repeat(count))
if (count > 0) {
output += currentIcon.color(currentIcon.char.repeat(count))
}

// Start tracking new group
count = 1
currentIcon = icon
}

output += currentIcon.color(currentIcon.char.repeat(count))
if (count > 0) {
output += currentIcon.color(currentIcon.char.repeat(count))
}

return output
}
Loading