You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ng generate web-worker adds webWorkerTsConfig to the @angular/build:unit-test target, breaking ng test #34385
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 generate web-worker in a newly created application breaks ng test.
The web-worker schematic adds webWorkerTsConfig to the options of the project's test target, regardless of
which builder that target uses. New applications use the @angular/build:unit-test builder, whose schema does not
have a webWorkerTsConfig option, so ng test fails schema validation afterwards.
The option is still needed on the build target (where the schematic also adds it). Removing it from the test
target makes ng test pass again, including with the worker in place.
Suggested fix: only add webWorkerTsConfig to the test target when it uses a Karma builder
(@angular-devkit/build-angular:karma / @angular/build:karma). The unit-test builder gets build options from
its buildTarget. Happy to send a PR with a spec.
Activity