-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore: migrate integration-tests
from jest
to vitest
#10778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JoshuaKGoldberg
merged 68 commits into
typescript-eslint:main
from
aryaemami59:chore/integration-tests-vitest-migration
Apr 14, 2025
Merged
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
8725a18
Install `vitest`
aryaemami59 010f39e
Rename `jest.config.js` to `vitest.config.mts`
aryaemami59 7386ded
chore(integration-tests): migrate to `vitest`
aryaemami59 c4e8bbb
chore: validate root TS (#10912)
kirkwaiblinger 487c80d
fix(eslint-plugin): [prefer-nullish-coalescing] treat `any`/`unknown`…
kirkwaiblinger 8bca77c
chore: update sponsors (#10923)
typescript-eslint[bot] 26cde72
Update `vitest` to version 3.0.8
aryaemami59 3cb652d
Remove `vitest/no-done-callback` as it is deprecated.
aryaemami59 530039c
Fix Vitest config
aryaemami59 d470828
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 487271f
Include `vitest.config.mts` in `tsconfig.spec.json`
aryaemami59 39e3eb6
Add `vitest.config.mts` files to ESLint configuration
aryaemami59 5529d48
Use `defineProject` instead of `defineConfig`
aryaemami59 c821137
Simplify `workspace` and `coverage.exclude`
aryaemami59 6eea50b
Explicitly enable `resolveJsonModule`
aryaemami59 6f44100
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 47971cd
Use `.replace` instead of `.split`
aryaemami59 4ac2aba
Type check `vitest.config.mts` files using project references.
aryaemami59 aeaab08
Fix `@nx/vite/plugin` usage in `nx.json`
aryaemami59 f543444
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 59f3be5
Update `@vitest/eslint-plugin` to version 1.1.37
aryaemami59 d56610e
Fix Vitest config
aryaemami59 d4cd6f6
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 735f3b0
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 046ef20
Update `vite` to version 6.2.2
aryaemami59 94d08d0
Fix `typecheck` task
aryaemami59 9871b35
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 57d699b
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 936b603
Update `vitest` to version 3.0.9
aryaemami59 6067c14
Update `@vitest/eslint-plugin` to version 1.1.38
aryaemami59 3644c1c
Fix `integration-tests`
aryaemami59 67ca16a
Fix `integration-tests`
aryaemami59 b5cae28
Fix `knip`
aryaemami59 d73f172
Fix `knip`
aryaemami59 16429f3
Remove unnecessary `typings/global.d.ts` file
aryaemami59 bb33d08
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 5839e09
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 ec002c1
Update `vitest` to version 3.1.1
aryaemami59 dc90e87
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 5202a7e
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 b23c42d
Update `@vitest/eslint-plugin` to version 1.1.39
aryaemami59 4a09a2d
Fix `knip` config
aryaemami59 c2411a7
Update `vite` to version 6.2.5
aryaemami59 308e3ba
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 977ca54
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 9da04c0
Fix `integration-tests`
aryaemami59 4d4b731
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 59482bc
Fix `integration-tests`
aryaemami59 09958c9
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 b802e16
Update `vite` to version 6.2.6
aryaemami59 e000051
Update `@vitest/eslint-plugin` to version 1.1.40
aryaemami59 03b251f
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 5ea2722
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 03a9ddc
Update `@vitest/eslint-plugin` to version 1.1.42
aryaemami59 1ad683c
Enable the new `vitest/prefer-describe-function-title` rule
aryaemami59 c381351
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 85871ec
Use `vitestPlugin.configs.env`
aryaemami59 1472976
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 6ccbe2a
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 9e8eeb4
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 578d215
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 24ab0be
Run `ast-spec:typecheck` during `postinstall`
aryaemami59 3aada33
Fix `ast-spec:test`
aryaemami59 67e80df
Try disabling remote cache
aryaemami59 bb7e02e
Try disabling remote cache
aryaemami59 3f8d5fb
Update `typecheck` output path in `nx.json`
aryaemami59 e62aa0a
Fix `vitest` coverage output when run with `nx`
aryaemami59 b770af7
Merge branch 'main'
JoshuaKGoldberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,12 +1,17 @@ | ||
{ | ||
"name": "integration-tests", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"type": "library", | ||
"projectType": "library", | ||
"root": "packages/integration-tests", | ||
"sourceRoot": "packages/integration-tests/tools", | ||
"implicitDependencies": ["typescript-eslint"], | ||
"targets": { | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"] | ||
}, | ||
"test": { | ||
"executor": "@nx/vite:test" | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
packages/integration-tests/tests/__snapshots__/eslint-v8.test.ts.snap
This file contains hidden or 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 hidden or 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 hidden or 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
4 changes: 2 additions & 2 deletions
4
packages/integration-tests/tests/__snapshots__/markdown.test.ts.snap
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
...s/integration-tests/tests/__snapshots__/recommended-does-not-require-program.test.ts.snap
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
packages/integration-tests/tests/__snapshots__/vue-jsx.test.ts.snap
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
packages/integration-tests/tests/__snapshots__/vue-sfc.test.ts.snap
This file contains hidden or 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 hidden or 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,10 +1,10 @@ | ||
import * as fs from 'node:fs/promises'; | ||
import * as path from 'node:path'; | ||
|
||
import { execFile, FIXTURES_DESTINATION_DIR } from './pack-packages'; | ||
import { execFile, FIXTURES_DESTINATION_DIR } from './pack-packages.js'; | ||
|
||
// make sure that jest doesn't timeout the test | ||
jest.setTimeout(60_000); | ||
// make sure that vitest doesn't timeout the test | ||
vi.setConfig({ testTimeout: 60_000 }); | ||
Comment on lines
+6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could just move this into |
||
|
||
function integrationTest( | ||
testName: string, | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.