Repository navigation
Conversation
…ts are skipped with `skipTests` application schematic already leaves out test target, spec reference in root `tsconfig.json`, test runner dependencies and spec files, yet it still wrote `tsconfig.spec.json` that no target or tsconfig refrences file is now filtered out for `skipTests` same way as for `minimal`, so `ng new --skip-tests` and `ng g app --skip-tests` no longer leave it behind `"test": "ng test"` script in workspace `package.json` is still added, workspace schematic has no `skipTests` option Refs angular#9160
There was a problem hiding this comment.
Code Review
This pull request updates the Angular application schematic to prevent the creation of tsconfig.spec.json when the skipTests option is enabled, in addition to when the minimal option is set. It also adds a corresponding unit test to verify this behavior. I have no feedback to provide as there are no review comments.
Collaborator
|
This is actually working as intended. |
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.
PR Checklist
PR Type
What is the current behavior?
Issue Number: #9160
I start apps with
ng new --skip-testsand first thing after is deletingtsconfig.spec.jsonby handOn 22.2.3
ng new st --skip-testsstill createsst/tsconfig.spec.jsonwithvitest/globalstypes, whileangular.jsonhas onlybuildandserveand vitest is not inpackage.jsonFilter for
tsconfig.spec.json.templateinapplication/index.tschecks onlyminimal, other test bits there (test target, spec project reference, test dependencies, schematic defaults) already checkskipTests || minimalWhat is the new behavior?
tsconfig.spec.jsonis filtered out withskipTeststoo, same shape as #32550ng new --skip-testsandng g app --skip-testsno longer create itNew case in
application/index_spec.tsfails on mainDoes this PR introduce a breaking change?
Other information
Commit says
Refs #9160since issue is not fully covered: rootpackage.jsonstill gets"test": "ng test"fromworkspaceschematic, which knows onlyminimalThat needs new
skipTestsoption onworkspacepassed fromng-new, can add it here or in seperate PR if you wantLibrary schematic has no
skipTestsoption, so nothing changes there