Skip to content

Commit 45e166b

Browse files
layershifterclaude
andauthored
chore: remove jest, ts-jest, @nx/jest dev dependencies (#942)
* chore: remove jest, ts-jest, @nx/jest, and related dev dependencies All packages have been migrated to vitest (#935-#940). This drops the jest runtime entirely: - Remove root jest.config.ts and jest.preset.js - Remove @nx/jest:jest target config from nx.json - Drop devDependencies: @nx/jest, @types/jest, babel-jest, eslint-plugin-jest, jest, jest-chrome, jest-environment-jsdom, jest-util, ts-jest - Drop the eslint-plugin-jest plugin and its no-focused-tests rule registration from the root eslint config - Drop **/jest.setup.{js,ts} from the root eslint config's no-extraneous-dependencies override scope - Drop **/jest.config.js from beachball ignorePatterns - Update lockfile Note: this PR depends on #935, #936, #937, #938, #939, #940 — merge those first. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(devtools): use explicit vitest imports @types/jest was previously providing global describe/it/expect types for @griffel/devtools' tests. With it removed, switch the tests to explicit `import { describe, it, expect, vi } from 'vitest'` and drop the now-unused `vitest/globals` types entry / `globals: true` from vite.config.ts — matching @griffel/core's style. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Change files --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 94faea4 commit 45e166b

13 files changed

Lines changed: 22 additions & 395 deletions

beachball.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ module.exports = {
1010
'**/*.test.{ts,tsx}',
1111
'**/*.stories.tsx',
1212
'**/eslint.config.mjs',
13-
'**/jest.config.js',
1413
'**/project.json',
1514
'**/README.md',
1615
],
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "none",
3+
"comment": "chore: remove jest, ts-jest, @nx/jest, and related dev dependencies",
4+
"packageName": "@griffel/devtools",
5+
"email": "olfedias@microsoft.com",
6+
"dependentChangeType": "none"
7+
}

eslint.config.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import nx from '@nx/eslint-plugin';
22
import eslintConfigPrettier from 'eslint-config-prettier/flat';
33
import eslintPluginImportX from 'eslint-plugin-import-x';
4-
import eslintPluginJest from 'eslint-plugin-jest';
54
import storybook from 'eslint-plugin-storybook';
65

76
export default [
@@ -11,11 +10,6 @@ export default [
1110
eslintPluginImportX.flatConfigs.typescript,
1211
...storybook.configs['flat/recommended'],
1312
...nx.configs['flat/base'],
14-
{
15-
plugins: {
16-
jest: eslintPluginJest,
17-
},
18-
},
1913
{
2014
settings: {
2115
'import-x/resolver': {
@@ -47,7 +41,6 @@ export default [
4741
devDependencies: false,
4842
},
4943
],
50-
'jest/no-focused-tests': 'error',
5144
eqeqeq: 'error',
5245
'guard-for-in': 'error',
5346
'max-classes-per-file': 'error',
@@ -99,8 +92,6 @@ export default [
9992
'**/*.test.ts',
10093
'**/*.test.tsx',
10194
'**/*.test.mts',
102-
'**/jest.setup.js',
103-
'**/jest.setup.ts',
10495
'**/vitest.config.ts',
10596
'**/vitest.config.mts',
10697
'**/vitest.setup.ts',

jest.config.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

jest.preset.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

nx.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@
1515
"type-check": {
1616
"cache": true
1717
},
18-
"@nx/jest:jest": {
19-
"cache": true,
20-
"inputs": ["default", "^default", "{workspaceRoot}/jest.preset.js"],
21-
"options": {
22-
"passWithNoTests": true
23-
},
24-
"configurations": {
25-
"ci": {
26-
"ci": true,
27-
"codeCoverage": true
28-
}
29-
}
30-
},
3118
"@nx/eslint:lint": {
3219
"inputs": ["default", "^default", "{workspaceRoot}/eslint.config.mjs", "{workspaceRoot}/tools/eslint-rules/**/*"],
3320
"cache": true

package.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"@eslint/js": "10.0.1",
7373
"@nx/eslint": "22.7.1",
7474
"@nx/eslint-plugin": "22.7.1",
75-
"@nx/jest": "22.7.1",
7675
"@nx/js": "22.7.1",
7776
"@nx/node": "22.7.1",
7877
"@nx/react": "22.7.1",
@@ -92,7 +91,6 @@
9291
"@types/babel__helper-plugin-utils": "7.10.3",
9392
"@types/chrome": "0.1.40",
9493
"@types/debug": "^4.1.13",
95-
"@types/jest": "30.0.0",
9694
"@types/js-beautify": "^1.14.3",
9795
"@types/mini-css-extract-plugin": "2.5.1",
9896
"@types/node": "25.6.0",
@@ -107,7 +105,6 @@
107105
"@vitest/browser-playwright": "4.1.5",
108106
"@vitest/coverage-v8": "4.1.5",
109107
"@vitest/ui": "4.1.5",
110-
"babel-jest": "30.3.0",
111108
"babel-plugin-tester": "12.0.0",
112109
"beachball": "2.65.4",
113110
"bestzip": "2.2.0",
@@ -118,16 +115,11 @@
118115
"eslint-config-prettier": "10.1.8",
119116
"eslint-import-resolver-typescript": "4.4.4",
120117
"eslint-plugin-import-x": "4.16.2",
121-
"eslint-plugin-jest": "29.15.2",
122118
"eslint-plugin-react-compiler": "19.1.0-rc.2",
123119
"eslint-plugin-react-hooks": "7.1.1",
124120
"eslint-plugin-react-x": "5.7.3",
125121
"eslint-plugin-storybook": "10.3.6",
126122
"highlight.js": "11.11.1",
127-
"jest": "30.3.0",
128-
"jest-chrome": "0.8.0",
129-
"jest-environment-jsdom": "30.3.0",
130-
"jest-util": "30.3.0",
131123
"js-beautify": "^1.15.4",
132124
"jsdom": "~26.1.0",
133125
"lz-string": "1.5.0",
@@ -151,7 +143,6 @@
151143
"storybook": "10.3.6",
152144
"stylelint": "^17.11.0",
153145
"syncpack": "15.0.0",
154-
"ts-jest": "29.4.9",
155146
"typescript": "5.9.3",
156147
"typescript-eslint": "^8.59.1",
157148
"vite": "8.0.10",

packages/devtools/src/getMonolithicCSSRules.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, expect, it } from 'vitest';
2+
13
import { getMonolithicCSSRules } from './getMonolithicCSSRules';
24

35
describe('getMonolithicCSSRules', () => {

packages/devtools/src/sourceMap/sourceMapConsumer.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { vi } from 'vitest';
21
import type { RawSourceMap } from 'source-map-js';
2+
import { describe, expect, it, vi } from 'vitest';
3+
34
import { getFilePath, getOriginalPosition, resources } from './sourceMapConsumer';
45

56
describe('getOriginalPosition', () => {

packages/devtools/src/utils.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { filterSlots, getRulesBySlots } from './utils';
21
import type { DebugResult } from '@griffel/core';
2+
import { describe, expect, it } from 'vitest';
3+
34
import type { SlotInfo } from './types';
5+
import { filterSlots, getRulesBySlots } from './utils';
46

57
describe('getRulesBySlots', () => {
68
it('traverse debug result, gather and return all makeStyles slot name and rules', () => {

0 commit comments

Comments
 (0)