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

Ability to create multiple test projects for an app/lib #77

Closed
photomoose opened this issue Aug 7, 2021 · 4 comments
Closed

Ability to create multiple test projects for an app/lib #77

photomoose opened this issue Aug 7, 2021 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers outdated scope: core

Comments

@photomoose
Copy link
Contributor

photomoose commented Aug 7, 2021

We're contemplating moving our existing .NET projects all into a single monorepo using nx; great work so far with nx-dotnet...!

For a given app, we might have multiple test projects - for example, we might have a test project which contains only unit tests, another which contains integration tests and another which contains acceptance tests:

  • MyApp.Tests.Unit
  • MyApp.Tests.Integration
  • MyApp.Tests.Acceptance

I notice that the @nx-dotnet/core:test generator is hardcoded to create a test project named <app-name>-test - attempting to create another test project for the app fails due to the name already existing.

Could the generator be updated to allow the user to specify/override the "-test" suffix?

Note: admittedly, we could use the xunit Trait attribute to handle this scenario, but I would still prefer not to be constrained by a 1:1 ratio of app to test projects.

@AgentEnder
Copy link
Member

This should be a pretty easy addition, I'd suggest adding --suffix to the test project generator's schema, default value is test. Add it as a parameter to the generate-test-project utility, default value in function definition is -test, then update places its hard coded.

I'll leave this up for grabs, as it will be a hot second before I can get to it.

@AgentEnder AgentEnder added enhancement New feature or request good first issue Good for newcomers scope: core labels Aug 9, 2021
@photomoose
Copy link
Contributor Author

@AgentEnder I'll see what I can do...

github-actions bot pushed a commit that referenced this issue Aug 10, 2021
# [1.1.0](v1.0.2...v1.1.0) (2021-08-10)

### Features

* **core:** added support for test project name suffix ([#78](#78)) ([9f8f03c](9f8f03c)), closes [#77](#77)

Aug 10, 2021, 4:29 PM
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers outdated scope: core
Projects
None yet
Development

No branches or pull requests

2 participants