Skip to content

feat(cli): pass skip testing flag to application schematic#3448

Open
yudin-s wants to merge 1 commit into
nestjs:v12.0.0from
yudin-s:fix/new-skip-tests-schematic-option
Open

feat(cli): pass skip testing flag to application schematic#3448
yudin-s wants to merge 1 commit into
nestjs:v12.0.0from
yudin-s:fix/new-skip-tests-schematic-option

Conversation

@yudin-s
Copy link
Copy Markdown

@yudin-s yudin-s commented May 21, 2026

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

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

What is the current behavior?

The v12 nest new --skip-tests flag passes spec: false to the application schematic. That skips spec files, but it does not give the schematic enough information to skip the full testing scaffold.

Issue Number: Refs #2575

What is the new behavior?

When --skip-tests is enabled, the new command now passes both spec: false and skipTesting: true to the application schematic. This preserves the existing spec-file behavior while allowing the schematic to omit test files, Jest configuration, testing scripts, and testing-related dependencies.

This pairs with nestjs/schematics#2354.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Validated with:

npm test -- test/actions/new.action.spec.ts
npm run build
npm run lint
npm exec -- prettier --check actions/new.action.ts test/actions/new.action.spec.ts
git diff --check

npm run lint completed with one existing warning in lib/runners/runner.factory.ts and no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant