Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"@angular/ssr": "^0.0.0-PLACEHOLDER",
"@web/test-runner": "^0.20.0",
"browser-sync": "^3.0.2",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest": "^29.5.0 || ^30.0.5",
"jest-environment-jsdom": "^29.5.0 || ^30.0.5",
"karma": "^6.3.0",
"ng-packagr": "0.0.0-NG-PACKAGR-PEER-DEP",
"protractor": "^7.0.0",
Expand Down
13 changes: 13 additions & 0 deletions tests/legacy-cli/e2e/tests/jest/basic-version-29.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { applyJestBuilder } from '../../utils/jest';
import { ng, silentNpm } from '../../utils/process';

export default async function (): Promise<void> {
await applyJestBuilder();
await silentNpm('install', 'jest@29.5.0', 'jest-environment-jsdom@29.5.0', '--save-dev');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Do we need to continue to support v29? Since this is still experimental, I don't think we're on the hook for backwards compatibility yet and it's probably reasonable to limit this to the latest major unless we have reason to believe that will be exceptionally difficult for users to adopt.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it seems that this would need further investigation to get version 30 to work. Let's have a chat about this offline to see the next steps for this builder.


const { stderr } = await ng('test');

if (!stderr.includes('Jest builder is currently EXPERIMENTAL')) {
throw new Error(`No experimental notice in stderr.\nSTDERR:\n\n${stderr}`);
}
}
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/utils/jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function applyJestBuilder(
polyfills: ['zone.js', 'zone.js/testing'],
},
): Promise<void> {
await silentNpm('install', 'jest@29.5.0', 'jest-environment-jsdom@29.5.0', '--save-dev');
await silentNpm('install', 'jest@30.0.5', 'jest-environment-jsdom@30.0.5', '--save-dev');

await updateJsonFile('angular.json', (json) => {
const projects = Object.values(json['projects']);
Expand Down
Loading