Repository navigation
Conversation
…der test targets The `web-worker` schematic added the `webWorkerTsConfig` option to the project's `test` target regardless of its builder. New applications use the `@angular/build:unit-test` builder, which does not have this option, so `ng test` failed schema validation with `Unknown option "webWorkerTsConfig"` after generating a web worker. The option is no longer added to `test` targets that use the unit-test builder, which reads build options from its `buildTarget`. Other test builders, such as Karma, still receive the option. Fixes angular#34385
There was a problem hiding this comment.
Code Review
This pull request updates the web-worker schematic to prevent adding the 'webWorkerTsConfig' option to a test target when the builder is 'Builders.BuildUnitTest', as this builder does not support that option and instead reads it from the build target. It also adds corresponding unit tests to verify this behavior for both unit-test and karma builders. I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
web-workerschematic added thewebWorkerTsConfigoption to the project'stesttarget regardless of its builder. New applications use the@angular/build:unit-testbuilder, which does not have this option, song testfailed schema validation withUnknown option "webWorkerTsConfig"after generating a web worker.The option is no longer added to
testtargets that use the unit-test builder, which reads build options from itsbuildTarget. Other test builders, such as Karma, still receive the option.Fixes #34385