Repository navigation
fix(@angular/build): resolve "Controller is already closed" error in Karma - #30653
Conversation
3bb2141 to
c621772
Compare
9d404a8 to
ef6092c
Compare
6bb0cf1 to
4673259
Compare
f38af30 to
9bee394
Compare
| "watch": { | ||
| "type": "boolean", | ||
| "description": "Run build when files change." | ||
| "description": "Re-run tests when source files change.", |
There was a problem hiding this comment.
Double-checking: Was it ever a thing that the karma builder would default to non-watching outside of TTY?
| "watch": { | ||
| "type": "boolean", | ||
| "description": "Run build when files change." | ||
| "description": "Re-run tests when source files change. Defaults to `false` in TTY environments and `true` otherwise." |
There was a problem hiding this comment.
Is the default flipped here? I assume we do watch in TTY environments and don't outside of them? (Ref https://nodejs.org/api/tty.html#tty)
There was a problem hiding this comment.
I meant false in non-TTY.
…Karma This issue stems from the `Some of your tests did a full page reload` error, which occurs because `karmaOptions.client.clearContext` is set to `true` when `singleRun` is `false`, even though Karma is running in watch mode. Previously, the `watch` flag was configured inconsistently across multiple locations, leading to misalignment. Closes angular#30506
9bee394 to
29bd9db
Compare
Descriptions for the "watch" option where not clear.
…lders This ensures a cleaner and easier to follow code and also avoid having the fix bugs in multiple places.
29bd9db to
9e1d328
Compare
|
The changes were merged into the following branches: main, 20.1.x |
`NODE_ENV=build yarn test` throws an error: TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed bug: angular/angular-cli#30653 Update Angular to latest version with Karma fix: npx ng update @angular/core@latest @angular/cli@latest @angular/cdk@latest
|
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. |
This issue stems from the
Some of your tests did a full page reloaderror, which occurs becausekarmaOptions.client.clearContextis set totruewhensingleRunisfalse, even though Karma is running in watch mode. Previously, thewatchflag was configured inconsistently across multiple locations, leading to misalignment.Closes #30506