Open MikeDabrowski opened 1 year ago
i'm facing the same issue since a couple of weeks
Facing same issue... In generel it is always adding the .spec file to the app folder for some reason.
Its seems like it only applies for the @ngneat/spactator:spectator-(component/directive, etc), where "jest" has been set to true:
"@ngneat/spectator:spectator-component": {
"jest": true
},
Edit: I have now tried to roll back to v14 from v16 and it seems to work with earlier versions... I rolled back using angular v14.2.10 and "@ngneat/spectator": "^12.0.1",
Facing same issue but it's not only when jest parameter is set to true.
I have the same issue and I'm not using jest
Some workaround
"@ngneat/spectator:spectator-component": {
"jest": true,
"flat": false
},
This problem applies to every schema that I have tested so far (directive, component, pipe, service). I'm willing to help out and I know where to look for a fix but so far I'm unable to produce a clean solution.
Tested on the latest release of spectator
Is this a regression?
No
Description
Is it intended that running
ng g @ngneat/spectator:spectator-component test-help
produces:with the test file being in a different directory? The following line does that: https://github.com/ngneat/spectator/blob/5320a1963b784001743723fb397463892c3dfc68/projects/spectator/schematics/src/spectator/index.ts#L33
When executing the
options.path
points to/src/app
and ifoptions.flat
istrue
thenmovePath
becomes/src/app/test-help
.If it is intended - how to opt-out and follow the same convention as angular has? If it is NOT intended - one way to fix this would be to copy the path generating mechanism from angular schematics.
Do you want to create a pull request?
Yes