Skip to content

Commit

Permalink
test: fix flaky slowTestThreshold test (#5130)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa authored Feb 7, 2024
1 parent dcf0d6a commit 2085131
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions test/reporters/fixtures/duration/basic.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { test } from 'vitest';

test('fast', async () => {
await sleep(10)
test('fast', () => {
});

test('slow', async () => {
await sleep(200)
await sleep(300)
});

const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
2 changes: 1 addition & 1 deletion test/reporters/fixtures/duration/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { defineConfig } from 'vitest/config'

export default defineConfig({
test: {
slowTestThreshold: 100
slowTestThreshold: 290
}
})

0 comments on commit 2085131

Please sign in to comment.