Skip to content

fix(@schematics/angular): remove test build options from angular.json if skipTests is passed #25901

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

Closed
wants to merge 0 commits into from

Conversation

sp90
Copy link

@sp90 sp90 commented Sep 25, 2023

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

I often feel that skipTests add a lot of code that is unessary for non test applications and could probably benefit from adding it if there are added tests later on

What is the current behavior?

ng new newApp --skip-tests it only skip .spec.ts

Issue Number: N/A

What is the new behavior?

It does also skip the angular.json build configuration for tests

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I think this could be a first PR in a series of PR's where we go towards having skip-tests applied by default to reduce boilerplate of a base angular app.

And then i think we should later on create scripts/packages like ng add @angular/test/jest or ng add @angular/e2e/playwright

This also aligns perfectly with making rxjs optional and having angular/ssr as an optional part of angular

@sp90 sp90 changed the title test: remove test build options from angular.json if skipTests is passed fix(@schematics/angular): remove test build options from angular.json if skipTests is passed Sep 25, 2023
@sp90
Copy link
Author

sp90 commented Sep 26, 2023

Just fixed with squash of the previous commit to simplify git history

@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Oct 4, 2023
@dgp1130 dgp1130 added this to the v18 Candidates milestone Nov 9, 2023
@sp90 sp90 closed this Jan 15, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants