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

Failing action unit test without creators from NgRx schematic #2082

Closed
walrus95 opened this issue Aug 23, 2019 · 1 comment · Fixed by #2092
Closed

Failing action unit test without creators from NgRx schematic #2082

walrus95 opened this issue Aug 23, 2019 · 1 comment · Fixed by #2092
Labels
Accepting PRs bug community watch Someone from the community is working this issue/PR Project: Schematics

Comments

@walrus95
Copy link

When I use the action schematic to generate an action unit test with creators, I get a passing unit test. However, when I use the action schematic to generate an action unit test without creators, I get a failing unit test.

##Minimal reproduction of the bug/regression with instructions:

You get a failing spec when not using creators:

$ ng g @ngrx/schematics:action Add --project=counter --spec
$ npm test

ERROR in src/app/add.actions.spec.ts:1:10 - error TS2305: Module '"C:/Users/walrus95/proj/counter/src/app/add.actions"' has no exported member 'Add'.
1 import { Add } from './add.actions';

However, you get a passing spec when using creators:

$ ng g @ngrx/schematics:action Add --project=counter --spec --creators
$ npm test
TOTAL: 3 SUCCESS

Expected behavior:

I would expect my newly created test to always be passing regardless of the use of creators, but at the very least it should be consistent.

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

NgRx 8, Angular 8, Node 10.16.0

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

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

Too busy swimming the arctic ocean. Splash, splash.

@agugan
Copy link
Contributor

agugan commented Aug 27, 2019

I would like to submit a PR for this. I will send it by tonight.

@timdeschryver timdeschryver added the community watch Someone from the community is working this issue/PR label Aug 27, 2019
jordanpowell88 pushed a commit to jordanpowell88/platform that referenced this issue Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepting PRs bug community watch Someone from the community is working this issue/PR Project: Schematics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants