-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(runner): suite timeout does not take effect (#3455)
- Loading branch information
Showing
4 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { describe, expect, test } from 'vitest' | ||
|
||
describe('suite timeout', () => { | ||
test('true is true after 5100ms', async () => { | ||
await new Promise(resolve => setTimeout(resolve, 5100)) | ||
expect(true).toBe(true) | ||
}) | ||
}, { | ||
timeout: 6000, | ||
}) | ||
|
||
describe('suite timeout simple input', () => { | ||
test('true is true after 5100ms', async () => { | ||
await new Promise(resolve => setTimeout(resolve, 5100)) | ||
expect(true).toBe(true) | ||
}) | ||
}, 6000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
import { test } from 'vitest' | ||
import { suite, test } from 'vitest' | ||
|
||
test('hi', async () => { | ||
await new Promise(resolve => setTimeout(resolve, 1000)) | ||
}, 10) | ||
|
||
suite('suite timeout', () => { | ||
test('hi', async () => { | ||
await new Promise(resolve => setTimeout(resolve, 500)) | ||
}) | ||
}, { | ||
timeout: 100, | ||
}) | ||
|
||
suite('suite timeout simple input', () => { | ||
test('hi', async () => { | ||
await new Promise(resolve => setTimeout(resolve, 500)) | ||
}) | ||
}, 200) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters