Skip to content

Commit 0db360d

Browse files
authored
chore(app-defaults): migrate to Jest 30 (#3006)
Install Jest 30 peer dependencies as required by @backstage/cli 0.36.0. Remove the custom jest-environment-jsdom-suppress-css package, as JSDOM 27 natively handles CSS @layer declarations that previously caused parse errors. Signed-off-by: Jon Koops <jonkoops@gmail.com>
1 parent a58f426 commit 0db360d

8 files changed

Lines changed: 1978 additions & 341 deletions

File tree

workspaces/app-defaults/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
"@backstage/e2e-test-utils": "^0.1.2",
4343
"@backstage/repo-tools": "^0.17.0",
4444
"@changesets/cli": "^2.27.1",
45+
"@jest/environment-jsdom-abstract": "^30.3.0",
46+
"@types/jest": "^30.0.0",
47+
"jest": "^30.3.0",
48+
"jsdom": "^27.1.0",
4549
"knip": "^5.27.4",
4650
"node-gyp": "^9.0.0",
4751
"prettier": "^2.3.2",

workspaces/app-defaults/packages/app/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
"backstage": {
1212
"role": "frontend"
1313
},
14-
"jest": {
15-
"testEnvironment": "@internal/jest-environment-jsdom-suppress-css"
16-
},
1714
"scripts": {
1815
"start": "backstage-cli package start",
1916
"build": "backstage-cli package build",
@@ -59,7 +56,6 @@
5956
},
6057
"devDependencies": {
6158
"@backstage/frontend-test-utils": "^0.5.1",
62-
"@internal/jest-environment-jsdom-suppress-css": "workspace:^",
6359
"@playwright/test": "^1.58.2",
6460
"@testing-library/dom": "^10.0.0",
6561
"@testing-library/jest-dom": "^6.0.0",

workspaces/app-defaults/packages/jest-environment-jsdom-suppress-css/jest-environment-jsdom-suppress-css.cjs

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

workspaces/app-defaults/packages/jest-environment-jsdom-suppress-css/package.json

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

workspaces/app-defaults/plugins/app-auth/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
"@red-hat-developer-hub/backstage-plugin-app-auth"
3636
]
3737
},
38-
"jest": {
39-
"testEnvironment": "@internal/jest-environment-jsdom-suppress-css"
40-
},
4138
"sideEffects": false,
4239
"configSchema": "config.d.ts",
4340
"scripts": {
@@ -63,7 +60,6 @@
6360
"devDependencies": {
6461
"@backstage/cli": "^0.36.0",
6562
"@backstage/test-utils": "^1.7.16",
66-
"@internal/jest-environment-jsdom-suppress-css": "workspace:^",
6763
"@testing-library/jest-dom": "^6.0.0",
6864
"@testing-library/react": "^16.0.0",
6965
"@types/react": "^18",

workspaces/app-defaults/plugins/app-integrations/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
"@red-hat-developer-hub/backstage-plugin-app-integrations"
3636
]
3737
},
38-
"jest": {
39-
"testEnvironment": "@internal/jest-environment-jsdom-suppress-css"
40-
},
4138
"sideEffects": false,
4239
"scripts": {
4340
"start": "backstage-cli package start",
@@ -59,7 +56,6 @@
5956
"devDependencies": {
6057
"@backstage/cli": "^0.36.0",
6158
"@backstage/test-utils": "^1.7.16",
62-
"@internal/jest-environment-jsdom-suppress-css": "workspace:^",
6359
"@testing-library/jest-dom": "^6.0.0",
6460
"@testing-library/react": "^16.0.0",
6561
"@types/react": "^18",

workspaces/app-defaults/plugins/app-react/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
"@red-hat-developer-hub/backstage-plugin-app-react"
3636
]
3737
},
38-
"jest": {
39-
"testEnvironment": "@internal/jest-environment-jsdom-suppress-css"
40-
},
4138
"sideEffects": false,
4239
"scripts": {
4340
"start": "backstage-cli package start",
@@ -61,7 +58,6 @@
6158
"devDependencies": {
6259
"@backstage/cli": "^0.36.0",
6360
"@backstage/test-utils": "^1.7.16",
64-
"@internal/jest-environment-jsdom-suppress-css": "workspace:^",
6561
"@testing-library/jest-dom": "^6.0.0",
6662
"@testing-library/react": "^16.0.0",
6763
"cross-fetch": "^4.0.0",

0 commit comments

Comments
 (0)