-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Open
Labels
angular/build:unit-testarea: @angular/buildneeds: investigationRequires some digging to determine if action is neededRequires some digging to determine if action is needed
Description
Command
test
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Running ng test in brand new project made via angular-cli v21.0.2 fails on error Error: Cannot find module '/src/app/app.spec.ts'.
Minimal Reproduction
Repro in Terminal (Windows 11):
ng new angular21dot0dot2 --ssr=false --style=scss --ai-config=none
cd angular21dot0dot2
ng test
Exception or Error
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL angular21dot0dot2 src/app/app.spec.ts [ src/app/app.spec.ts ]
Error: Cannot find module '/src/app/app.spec.ts'
Your Environment
Angular CLI : 21.0.2
Node.js : 22.21.1
Package Manager : npm 10.9.4
Operating System : win32 x64
Anything else relevant?
No response
Metadata
Metadata
Assignees
Labels
angular/build:unit-testarea: @angular/buildneeds: investigationRequires some digging to determine if action is neededRequires some digging to determine if action is needed