-
Notifications
You must be signed in to change notification settings - Fork 380
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
Allow custom suffix when generating unit tests #1683
Comments
Would you like to create a PR for this issue? |
@kamilmysliwiec I'll see what I can do.👍 |
@kamilmysliwiec implementing this takes longer than I anticipated. To prepare for this change, I opened a draft PR in the schematics repo (nestjs/schematics#1077). Let me know if I'm taking a wrong route. Otherwise, I'll gradually finish that PR and then finish the work up here. |
Thanks @garritfra, let's track this here nestjs/schematics#1077! |
@kamilmysliwiec Does this need to be reopened? I don't believe the feature has been implemented and didn't make it into the cli as part of nestjs/schematics#1077 @garritfra Am I seeing that correctly? |
@hrkeni yes, that's correct. I don't have the time to work on it anymore, but it should be a simple change. |
I would be happy to work on this. |
@kamilmysliwiec Please reopen this issue and review PRs or let me know if I should open another issue here. Thank you. |
@micalevisk Apologies for the spam. Can you take a look at the comments above and advise? |
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
We've settled with
.test.ts
as a unit-test suffix for all of our projects. While Nest is able to interpret these files, it can only produce.spec.ts
files when generating a resource, which breaks our convention. It would be nice to be able to specify a custom suffix as a cli option.Describe the solution you'd like
There should be a cli flag and config option to specify the suffix to be used, with the default being
spec
.nest-cli.json
:(flag and option naming TBD.)
Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
Implementing this feature makes it easier to adopt company conventions.
The text was updated successfully, but these errors were encountered: