Skip to content

Commit

Permalink
fix(bench): rank sorting, fix #2006 (#2007)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmccurdy committed Sep 10, 2022
1 parent 0c2e323 commit def8a77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vitest/src/runtime/run.ts
Expand Up @@ -347,7 +347,7 @@ async function runBenchmarkSuit(suite: Suite) {
suite.result!.state = 'pass'

benchmarkInstance.tasks
.sort((a, b) => b.result!.mean - a.result!.mean)
.sort((a, b) => a.result!.mean - b.result!.mean)
.forEach((cycle, idx) => {
const benchmark = benchmarkMap[cycle.name || '']
benchmark.result!.state = 'pass'
Expand Down

0 comments on commit def8a77

Please sign in to comment.