-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karma builder doesn't watch files with "builderMode: application" #28730
Comments
I can repro: -- Watches for changes:
$ ng test --builder-mode=application --watch
-- Doesn't watch for changes (but keeps browser open):
$ ng test --builder-mode=application
-- Doesn't watch for changes, closes browser.
$ ng test --builder-mode=application --no-watch
-- Watches for changes:
$ ng test --builder-mode=browser
$ ng test --builder-mode=browser --watch
-- Doesn't watch for changes, closes browser.
$ ng test --builder-mode=browser --no-watch So it looks like the |
Outside of single-run mode, the karma test provider was expected to watch for changes. In the application builder branch, we only handled the case of an explicit `--watch` though. This meant that the karma runner was kept running but didn't see any file changes. Fixes angular#28730
Thanks for trying this out & the great bug details. Verified that the following fixes the bug: #28739 |
Outside of single-run mode, the karma test provider was expected to watch for changes. In the application builder branch, we only handled the case of an explicit `--watch` though. This meant that the karma runner was kept running but didn't see any file changes. Fixes #28730 (cherry picked from commit 8646751)
The fix should be included in this week's |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
test
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Using the
"builderMode": "application",
option in the Karam builder breaksng test
watch capabilitiesMinimal Reproduction
Create a new project with
npx @angular/cli@19.0.0-next.13 new karma-watch --defaults --no-routing
Add
"builderMode": "application",
toangular.json
in thekarma
options.Launch
ng test
Update any file of the project like
app.component.ts
orapp.component.spec.ts
: the tests don't run again.Exception or Error
No response
Your Environment
Angular CLI: 19.0.0-next.13
Node: 20.13.1
Package Manager: npm 9.7.1
OS: darwin arm64
Angular: 19.0.0-next.11
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.1900.0-next.13
@angular-devkit/build-angular 19.0.0-next.13
@angular-devkit/core 19.0.0-next.13
@angular-devkit/schematics 19.0.0-next.13
@angular/cli 19.0.0-next.13
@schematics/angular 19.0.0-next.13
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: