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

feat(testing): add projects into jest config #3766

Merged
merged 4 commits into from
Sep 23, 2020

Conversation

Cammisuli
Copy link
Member

@Cammisuli Cammisuli commented Sep 18, 2020

Current Behavior

Jest configs are independant, and cannot be run from the root of the workspace with just jest. This causes some issues with VsCode extensions.

Expected Behavior

The root jest.config.js file now contains references to all jest projects in the workspace. A new jest.preset.js file is created as well where each project config has this as a preset.

Related Issue(s)

Closes #747
Closes #1506
Closes #2377
Closes #2344
Closes #2635
Closes #3507

@nx-cloud
Copy link

nx-cloud bot commented Sep 18, 2020

Nx Cloud Report

CI ran the following commands. Click to see the status, the terminal output, and the build insights.

Status Command Start Time
#000000 nx build-base angular 9/22/2020, 10:32:30 PM
#000000 nx build-base express 9/22/2020, 10:32:47 PM
#000000 nx build-base nest 9/22/2020, 10:32:47 PM
#000000 nx build-base next 9/22/2020, 10:32:27 PM
#000000 nx build-base node 9/22/2020, 10:32:30 PM
#000000 nx build-base react 9/22/2020, 10:32:47 PM
#000000 nx build-base web 9/22/2020, 10:32:30 PM
#000000 nx run-many --target=build --all --parallel 9/22/2020, 10:32:08 PM
#000000 nx run-many --target=e2e --projects=e2e-angular 9/22/2020, 10:32:22 PM
#000000 nx run-many --target=e2e --projects=e2e-jest 9/22/2020, 10:32:44 PM
#000000 nx run-many --target=e2e --projects=e2e-next 9/22/2020, 10:33:04 PM
#000000 nx run-many --target=e2e --projects=e2e-node 9/22/2020, 10:32:34 PM
#000000 nx run-many --target=e2e --projects=e2e-react 9/22/2020, 10:33:36 PM
#000000 nx run-many --target=e2e --projects=e2e-web 9/22/2020, 10:32:37 PM
#000000 nx run-many --target=test --all --parallel 9/22/2020, 10:33:07 PM

Sent with 💌 from NxCloud.

@@ -1,3 +1,4 @@
import { tags } from '@angular-devkit/core';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks unused.

@@ -67,6 +69,7 @@ function run(
useStderr: options.useStderr,
watch: options.watch,
watchAll: options.watchAll,
projects: [options.jestConfig],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this was necessary.

@FrozenPandaz FrozenPandaz merged commit e6e2dc6 into nrwl:master Sep 23, 2020
@Cammisuli Cammisuli deleted the jest-projects branch September 23, 2020 11:56
Doginal pushed a commit to Doginal/nx that referenced this pull request Nov 25, 2020
* feat(testing): add projects into jest config

* chore(testing): update unit tests and fix presets with spreading a default

* chore(testing): fix node e2e

* chore(testing): review comment changes
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants