Skip to content

Commit 4186d3e

Browse files
committed
fix(@angular-devkit/build-angular): expand jest and jest-environment-jsdom to allow version 30
This commit expands the peer deps of these dependencies to allow version 30. Closes #30760
1 parent 5d085ee commit 4186d3e

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

packages/angular_devkit/build_angular/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
"@angular/ssr": "^0.0.0-PLACEHOLDER",
8282
"@web/test-runner": "^0.20.0",
8383
"browser-sync": "^3.0.2",
84-
"jest": "^29.5.0",
85-
"jest-environment-jsdom": "^29.5.0",
84+
"jest": "^29.5.0 || ^30.0.5",
85+
"jest-environment-jsdom": "^29.5.0 || ^30.0.5",
8686
"karma": "^6.3.0",
8787
"ng-packagr": "0.0.0-NG-PACKAGR-PEER-DEP",
8888
"protractor": "^7.0.0",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { applyJestBuilder } from '../../utils/jest';
2+
import { ng, silentNpm } from '../../utils/process';
3+
4+
export default async function (): Promise<void> {
5+
await applyJestBuilder();
6+
await silentNpm('install', 'jest@29.5.0', 'jest-environment-jsdom@29.5.0', '--save-dev');
7+
8+
const { stderr } = await ng('test');
9+
10+
if (!stderr.includes('Jest builder is currently EXPERIMENTAL')) {
11+
throw new Error(`No experimental notice in stderr.\nSTDERR:\n\n${stderr}`);
12+
}
13+
}

tests/legacy-cli/e2e/utils/jest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function applyJestBuilder(
88
polyfills: ['zone.js', 'zone.js/testing'],
99
},
1010
): Promise<void> {
11-
await silentNpm('install', 'jest@29.5.0', 'jest-environment-jsdom@29.5.0', '--save-dev');
11+
await silentNpm('install', 'jest@30.0.5', 'jest-environment-jsdom@30.0.5', '--save-dev');
1212

1313
await updateJsonFile('angular.json', (json) => {
1414
const projects = Object.values(json['projects']);

0 commit comments

Comments
 (0)