-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Component schematics produces test file in different directory #611
Comments
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:
Could it be because of Angular 15+?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
|
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:
spectator/projects/spectator/schematics/src/spectator/index.ts
Line 33 in 5320a19
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
The text was updated successfully, but these errors were encountered: