Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update jest-preset-angular to version 16.0.0
Objective
Update
jest-preset-angularfrom version 14.6.2 to 16.0.0 to resolve compatibility issues with Angular 21 and improve test configuration.Changes Made
1. Dependency Updates
jest-preset-angularfrom^14.6.2to^16.0.02. Jest Configuration Migration
globalsconfiguration to the newtransformsyntaxglobalSetup(optional and was causing compatibility issues)3. TypeScript Configuration for Tests
emitDecoratorMetadata: trueto properly support dependency injection in testspathsmappings to correctly resolve Angular testing modules:@angular/core/testing@angular/common/http@angular/common/http/testing@angular/router/testing@angular/platform-browser/animationsIssues Resolved
globalsin ts-jest configurationCannot find module '@angular/core/testing')Test Results
Modified Files
package.json- Dependency updatejest.config.ts- Migration to new transform syntaxtsconfig.spec.json- Added emitDecoratorMetadata and pathsprojects/lux/tsconfig.spec.json- Added emitDecoratorMetadataAdditional Notes
globalSetupconfiguration was commented out as it's optional and was causing compatibility issues. If needed in the future, it can be properly configured according to jest-preset-angular 16.x documentationtsconfig.spec.jsonpoint directly to Angular type definition files to correctly resolve modules during TypeScript compilation in tests