fix(schematics): Use prefix option in feature schematic#3139
fix(schematics): Use prefix option in feature schematic#3139timdeschryver merged 5 commits intongrx:masterfrom
Conversation
This allows sharing the prefix logic with rest of the schematics.
This allows generation of effects with a prefix.
This allows generating reducers with a prefix
Previously, passing --prefix when generating a feature would make changes only in the generated action. This passes the prefix option to the effect and reducers as well. Fixes ngrx#3116
1ddec0f to
f1e03c7
Compare
|
Hi @hemangsk thanks for opening a PR. |
|
Hi @timdeschryver, yes this is ready for review now, can you please take a look? |
|
Thanks @hemangsk , we'll take a look as soon as we can. |
| expect(content).toMatch(/effects = TestBed\.inject\(FooEffects\);/); | ||
| }); | ||
|
|
||
| it('should add prefix to the effect', async () => { |
There was a problem hiding this comment.
One small remark, could you also write a test for when the action creators option is true please, because that's the one that is most used. The rest is looking good 👍
There was a problem hiding this comment.
@timdeschryver , added a test with creators option set as true for in the effect spec file. I'm not sure but do we need tests with creators: true in feature and reducer as well?
There was a problem hiding this comment.
The feature and reducer tests are by default creators: true, so this is fine for me.
Thanks for updating the PR! 👍
7b42544 to
3ec9173
Compare
|
Thanks @hemangsk ! |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Closes #3116
What is the new behavior?
When using the
featureschematic with--prefixoption,effectsandreducerswill use the supplied prefix.actionalready uses the supplied prefix.Does this PR introduce a breaking change?
Other information