10000 chore(rule-tester): migrate from `jest` to `vitest` by aryaemami59 · Pull Request #10779 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

chore(rule-tester): migrate from jest to vitest #10779

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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
db12fb1
Install `vitest`
aryaemami59 Feb 3, 2025
544e61a
Rename `jest.config.js` to `vitest.config.mts`
aryaemami59 Feb 3, 2025
7b65a55
chore(rule-tester): migrate to `vitest`
aryaemami59 Feb 3, 2025
51d99f2
Update `vitest` to version 3.0.8
aryaemami59 Mar 7, 2025
d7e3feb
Fix Vitest config
aryaemami59 Mar 7, 2025
4b9c171
Include `vitest.config.mts` in `tsconfig.spec.json`
aryaemami59 Mar 8, 2025
fa21966
Add `vitest.config.mts` files to ESLint configuration
aryaemami59 Mar 8, 2025
f6263cb
Use `defineProject` instead of `defineConfig`
aryaemami59 Mar 10, 2025
72c75f8
Explicitly enable `resolveJsonModule`
aryaemami59 Mar 10, 2025
b307230
Use `.replace` instead of `.split`
aryaemami59 Mar 10, 2025
81741aa
Type check `vitest.config.mts` files using project references.
aryaemami59 Mar 10, 2025
c8a36bd
Update `@vitest/eslint-plugin` to version 1.1.37
aryaemami59 Mar 11, 2025
71ab57d
Fix Vitest config
aryaemami59 Mar 12, 2025
ca0865d
Fix `typecheck` task
aryaemami59 Mar 16, 2025
66907d4
Update `vitest` to version 3.0.9
aryaemami59 Mar 26, 2025
3bc6f30
Update `@vitest/eslint-plugin` to version 1.1.38
aryaemami59 Mar 26, 2025
d4ab35f
Update `vitest` to version 3.1.1
aryaemami59 Mar 31, 2025
d7e4bd2
Update `@vitest/eslint-plugin` to version 1.1.39
aryaemami59 Apr 2, 2025
0353dcb
Switch to `it.for`
aryaemami59 Apr 2, 2025
d9c3c03
Fix `knip` config
8000 aryaemami59 Apr 3, 2025
9c96919
Update `vite` to version 6.2.5
aryaemami59 Apr 3, 2025
f70aacf
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 7, 2025
49f8cad
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 7, 2025
555c941
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 10, 2025
3942c10
Update `vite` to version 6.2.6
aryaemami59 Apr 10, 2025
e5d8061
Update `@vitest/eslint-plugin` to version 1.1.40
aryaemami59 Apr 10, 2025
918c658
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 10, 2025
47935a7
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
2274ba7
Update `@vitest/eslint-plugin` to version 1.1.42
aryaemami59 Apr 11, 2025
85bbc22
Enable the new `vitest/prefer-describe-function-title` rule
aryaemami59 Apr 11, 2025
2c516fe
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
1c0a994
Use `vitestPlugin.configs.env`
aryaemami59 Apr 11, 2025
138003f
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
b8e70f6
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
bf68c3c
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
7ec9338
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Apr 11, 2025
aafbc86
Run `ast-spec:typecheck` during `postinstall`
aryaemami59 Apr 11, 2025
f1fddfd
Fix `ast-spec:test`
aryaemami59 Apr 11, 2025
930f64f
Try disabling remote cache
aryaemami59 Apr 12, 2025
99a1e3f
Try disabling remote cache
aryaemami59 Apr 12, 2025
5ed60b8
Update `typecheck` output path in `nx.json`
aryaemami59 Apr 12, 2025
cdd1b3c
Fix `vitest` coverage output when run with `nx`
aryaemami59 Apr 12, 2025
5965d19
Fix `rule-tester` tests
aryaemami59 Apr 12, 2025
1e60fc7
chore: remove downlevel-dts added in merge artifact
JoshuaKGoldberg Apr 14, 2025
63099f8
Merge branch 'main'
JoshuaKGoldberg Apr 14, 2025
fa97476
Merge branch 'main'
JoshuaKGoldberg Apr 14, 2025
fcd36ce
Delete duplicates
JoshuaKGoldberg Apr 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const vitestFiles = [
'packages/integration-tests/tools/pack-packages.ts',
'packages/parser/tests/lib/**/*.test.{ts,tsx,cts,mts}',
'packages/parser/tests/test-utils/**/*.{ts,tsx,cts,mts}',
'packages/rule-tester/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/type-utils/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/typescript-eslint/tests/**/*.test.{ts,tsx,cts,mts}',
'packages/utils/tests/**/*.test?(-d).{ts,tsx,cts,mts}',
Expand Down
4 changes: 4 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export default {
},
'packages/rule-tester': {
ignore: ['typings/eslint.d.ts'],

mocha: {
entry: ['tests/eslint-base/eslint-base.test.js'],
},
},
'packages/scope-manager': {
ignore: ['tests/fixtures/**'],
Expand Down
7 changes: 0 additions & 7 deletions packages/rule-tester/jest.config.js

This file was deleted.

7 changes: 4 additions & 3 deletions packages/rule-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"lint": "npx nx lint",
"pretest-eslint-base": "tsc -b tsconfig.build.json",
"test-eslint-base": "mocha --require source-map-support/register ./tests/eslint-base/eslint-base.test.js",
"test": "npx jest",
"test": "vitest --run --config=$INIT_CWD/vitest.config.mts",
"check-types": "npx nx typecheck"
},
"//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70",
Expand All @@ -59,17 +59,18 @@
"eslint": "^8.57.0 || ^9.0.0"
},
"devDependencies": {
"@jest/types": "29.6.3",
"@types/json-stable-stringify-without-jsonify": "^1.0.2",
"@types/lodash.merge": "4.6.9",
"@vitest/coverage-v8": "^3.1.1",
"chai": "^4.4.1",
"eslint-visitor-keys": "^4.2.0",
"espree": "^10.3.0",
"esprima": "^4.0.1",
"mocha": "^10.4.0",
"sinon": "^16.1.3",
"source-map-support": "^0.5.21",
"typescript": "*"
"typescript": "*",
"vitest": "^3.1.1"
},
"funding": {
"type": "opencollective",
Expand Down
8 changes: 6 additions & 2 deletions packages/rule-tester/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "rule-tester",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"type": "library",
"implicitDependencies": [],
"projectType": "library",
"root": "packages/rule-tester",
"sourceRoot": "packages/rule-tester/src",
"targets": {
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nx/vite:test"
}
}
}
Loading
0