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): support root project generation for jest #13353

Merged
merged 6 commits into from
Nov 29, 2022

Conversation

barbados-clemens
Copy link
Contributor

@barbados-clemens barbados-clemens commented Nov 23, 2022

Current Behavior

@nrwl/jest does not work with experimental root projects

Expected Behavior

Enable jest to run in the experimental single root project setup and update configurations to support multi project jest projects when adding new projects with nx

Related Issue(s)

TODO

  • e2e tests
  • migration to ensuring getJestProjects() is used
  • more robust project config update detection when switching project types

@vercel
Copy link

vercel bot commented Nov 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Nov 29, 2022 at 2:02AM (UTC)

@barbados-clemens barbados-clemens force-pushed the feat/nested-projects-jest branch 2 times, most recently from 367f2de to 4c95853 Compare November 23, 2022 20:19
@barbados-clemens barbados-clemens self-assigned this Nov 23, 2022
@barbados-clemens barbados-clemens added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Nov 23, 2022
@barbados-clemens barbados-clemens force-pushed the feat/nested-projects-jest branch from 4c95853 to 1cd5c8a Compare November 23, 2022 20:35
@meeroslav meeroslav force-pushed the feat/nested-projects-jest branch from 1cd5c8a to 0b45d7c Compare November 24, 2022 22:20
@meeroslav meeroslav marked this pull request as ready for review November 24, 2022 22:20
@nrwl nrwl deleted a comment from barbados-clemens Nov 28, 2022
e2e/jest/src/jest.test.ts Outdated Show resolved Hide resolved
packages/jest/src/generators/init/init.ts Outdated Show resolved Hide resolved
packages/jest/src/generators/init/init.ts Outdated Show resolved Hide resolved
packages/jest/src/generators/init/init.ts Outdated Show resolved Hide resolved
packages/jest/src/generators/init/init.ts Outdated Show resolved Hide resolved
@barbados-clemens barbados-clemens force-pushed the feat/nested-projects-jest branch from 476b31a to bdef478 Compare November 29, 2022 01:56
@@ -27,7 +27,8 @@ export function createFiles(tree: Tree, options: JestProjectSchema) {
...options,
transformer,
js: !!options.js,
projectRoot: projectConfig.root,
rootProject: options.rootProject,
projectRoot: options.rootProject ? options.project : projectConfig.root,
Copy link
Collaborator

Choose a reason for hiding this comment

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

How come this changed?

updateFile,
expectJestTestsToPass,
cleanupProject,
readFile,
checkFilesExist,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary 🤷

@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 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants