-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Open
Labels
area: @angular-devkit/build-angulardevkit/build-angular:karmafreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
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
While ng test is running and watching for changes, if you add a new test file, that file is detected and causes the tests to run again, but the tests in that new file are not included in the test run. To include the tests from the new file, you need to restart the ng test process.
Minimal Reproduction
- In a terminal, run:
ng new watch --skip-git --style css --ssr=false
ng test
- Three tests are run.
- In a second terminal, run:
ng g component widget
- A new component is created with a test file that contains one test.
- The new test file is detected and the tests recompile.
- Only three tests are run.
- Add another test to the new component's test file.
- The change is detected and the tests recompile.
- Only three tests are run.
- Kill the
ng testprocess. - Run
ng testagain. - Five tests are run.
Exception or Error
No response
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 17.0.3
Node: 20.9.0
Package Manager: npm 10.1.0
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1700.3 (cli-only)
@angular-devkit/core 17.0.3 (cli-only)
@angular-devkit/schematics 17.0.3 (cli-only)
@schematics/angular 17.0.3 (cli-only)
Anything else relevant?
cexbrayat and luiz-soares
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:karmafreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
