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

When converting project to a monorepo configure all E2E tests to be run #1167

Open
1 task done
MitchellCash opened this issue Sep 6, 2022 · 1 comment · May be fixed by #1168
Open
1 task done

When converting project to a monorepo configure all E2E tests to be run #1167

MitchellCash opened this issue Sep 6, 2022 · 1 comment · May be fixed by #1168

Comments

@MitchellCash
Copy link
Contributor

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

When converting a project to a monorepo npm run test:e2e only runs the initial projects E2E tests.

Describe the solution you'd like

Let's say you have a Nest project called my-app and then inside my-app I run nest generate app my-other-app.

Inside the package.json we would have the test:e2e run command below:

"test:e2e": "jest --config ./apps/my-app/test/jest-e2e.json"

I would propose a possible solution that would look like:

"test:e2e": "jest --projects ./apps/my-app/test/jest-e2e.json ./apps/my-other-app/test/jest-e2e.json"

Note that instead of using the --config option I am instead using the --projects option to specify multiple E2E configuration files.

Teachability, documentation, adoption, migration strategy

This in theory is not a breaking change, nor requires any additional documentation.

What is the motivation / use case for changing the behavior?

I am just starting to convert a project to a monorepo and I found that the npm run test command would run all the tests across all apps, but the npm run test:e2e command would only run from the initial app. I thought it would make sense for them both to run all tests available in the project, not just from one app.

@kamilmysliwiec kamilmysliwiec transferred this issue from nestjs/nest Sep 7, 2022
@kamilmysliwiec
Copy link
Member

Would you like to create a PR for this issue?

MitchellCash added a commit to MitchellCash/nestjs-schematics that referenced this issue Sep 7, 2022
When a new SubApp is added to a project the project is now configured to run all
E2E tests by default.

Closes nestjs#1167
MitchellCash added a commit to MitchellCash/nestjs-schematics that referenced this issue Sep 7, 2022
When a new SubApp is added to a project the project is now configured to run all
E2E tests by default.

Closes nestjs#1167
MitchellCash added a commit to MitchellCash/nestjs-schematics that referenced this issue Sep 7, 2022
When a new SubApp is added to a project the project is now configured to run all
E2E tests by default.

Closes nestjs#1167
@MitchellCash MitchellCash linked a pull request Sep 7, 2022 that will close this issue
12 tasks
MitchellCash added a commit to MitchellCash/nestjs-schematics that referenced this issue Sep 8, 2022
When a new SubApp is added to a project the project is now configured to run all
E2E tests by default.

Closes nestjs#1167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants