Bump Vitest to v4 (#19216)
This PR bumps Vitest from v2 to v4. As far as I know we don't use any Vitest specific features in our tests, but had to upgrade the `vitest.workspace.ts` file to a `vitest.config.ts` file instead. The only features we use are the typical `describe`, `it`, `test`, and `expect` functions. The only other part we use is `vi.spyOn` and `vi.fn` but those didn't change in API either. The test shards were removed to prevent errors. Not all suites have enough files / tests to be broken up into 3 parts so Vitest now errors when that happens. ### Test plan 1. All tests should pass in CI. 2. All integration tests should pass in CI. --------- Co-authored-by: Jordan Pittman <jordan@cryptica.me>
This commit is contained in:
parent
642b9b8576
commit
479b725cd3
10 changed files with 346 additions and 565 deletions
|
|
@ -37,6 +37,7 @@ interface TestConfig {
|
|||
[filePath: string]: string | Uint8Array
|
||||
}
|
||||
|
||||
timeout?: number
|
||||
installDependencies?: boolean
|
||||
}
|
||||
interface TestContext {
|
||||
|
|
@ -86,7 +87,7 @@ export function test(
|
|||
return defaultTest(
|
||||
name,
|
||||
{
|
||||
timeout: TEST_TIMEOUT,
|
||||
timeout: config.timeout ?? TEST_TIMEOUT,
|
||||
retry: process.env.CI ? 2 : 0,
|
||||
only: only || (!process.env.CI && debug),
|
||||
skip,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue