Skip to content
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

schematics:feature --skipTest flag generates actions.spec.ts #2521

Closed
aszechlicki opened this issue May 11, 2020 · 1 comment · Fixed by #2522
Closed

schematics:feature --skipTest flag generates actions.spec.ts #2521

aszechlicki opened this issue May 11, 2020 · 1 comment · Fixed by #2522
Assignees
Labels
Accepting PRs community watch Someone from the community is working this issue/PR Good First Issue Good issue for first-time contributor

Comments

@aszechlicki
Copy link
Contributor

Minimal reproduction of the bug/regression with instructions:

ng g @ngrx/schematics:feature TestFeature --flat false -r index.ts --skipTest true

result:
CREATE src/app/reducers/test-f.actions.spec.ts (198 bytes)
CREATE src/app/reducers/test-f.actions.ts (123 bytes)
CREATE src/app/reducers/test-f.reducer.ts (328 bytes)
CREATE src/app/reducers/test-f.effects.ts (580 bytes)
CREATE src/app/reducers/test-f.selectors.ts (220 bytes)

Expected behavior:

No *.spec.ts files are generated

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):

Angular: 9.1.6
ngrx/core: 9.1.2
ngrx/schematics: 9.1.2

Other information:

I believe i tracked it down:
file platform/modules/schematics/src/feature/index.ts calls actions schematic:

schematic('action', {  
        flat: options.flat,  
        group: options.group,  
        name: options.name,  
        path: options.path,  
        project: options.project,  
        skipTest: true,
        api: options.api,  
        creators: options.creators,  
      })

thats first issue - value provided in options is ignored, and hardcoded true is passed instead

and then in platform/modules/schematics/src/action/schema.ts parameter name is:
skipTests?: boolean; (see the typo?)

I would be willing to submit a PR to fix this issue

[*] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No

@brandonroberts brandonroberts added Accepting PRs community watch Someone from the community is working this issue/PR Good First Issue Good issue for first-time contributor labels May 11, 2020
@brandonroberts
Copy link
Member

Good catch @aszechlicki. If you need help on the PR, just let us know.

aszechlicki pushed a commit to aszechlicki/platform that referenced this issue May 11, 2020
rename skipTests option in action schematics to skipTest, consistent with naming in other schematics
pass option value instead of hardcoded true in feature schematics
update tests

fixes ngrx#2521
aszechlicki pushed a commit to aszechlicki/platform that referenced this issue May 11, 2020
aszechlicki pushed a commit to aszechlicki/platform that referenced this issue May 12, 2020
rename skipTests option in action schematics to skipTest, consistent with naming in other schematics
pass option value instead of hardcoded true in feature schematics
update tests

fixes ngrx#2521
aszechlicki pushed a commit to aszechlicki/platform that referenced this issue May 12, 2020
aszechlicki pushed a commit to aszechlicki/platform that referenced this issue May 21, 2020
rename skipTests option in action schematics to skipTest, consistent with naming in other schematics
pass option value instead of hardcoded true in feature schematics
update tests

fixes ngrx#2521
aszechlicki pushed a commit to aszechlicki/platform that referenced this issue May 21, 2020
BioPhoton pushed a commit to BioPhoton/platform that referenced this issue Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepting PRs community watch Someone from the community is working this issue/PR Good First Issue Good issue for first-time contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants