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

@nx/react:application generator - cannot have unitTestRunner jest with bundler vite #22276

Closed
1 of 4 tasks
thaiKari opened this issue Mar 12, 2024 · 1 comment · Fixed by #23383
Closed
1 of 4 tasks
Assignees
Labels
outdated scope: react Issues related to React support for Nx type: bug

Comments

@thaiKari
Copy link

Current Behavior

When I use the @nx/react:application generator with options bundler=vite and unitTestRunner=jest, the project's "test" target uses vite

Expected Behavior

I expect the test target to use jest due to specifying jest as the unitTestRunner.

GitHub Repo

https://github.com/nrwl/nx-examples

Steps to Reproduce

  1. nx g @nx/react:application my-app --bundler=vite --e2eTestRunner=none --projectNameAndRootFormat=derived --unitTestRunner=jest
  2. nx show project my-app --web shows the test runner as vitest
    image

Nx Report

NX   Report complete - copy this into the issue template

   Node   : 20.9.0
   OS     : linux-x64
   yarn   : 1.22.22
   
   nx (global)        : 18.0.8
   nx                 : 18.0.4
   @nx/js             : 18.0.4
   @nx/jest           : 18.0.4
   @nx/linter         : 18.0.4
   @nx/eslint         : 18.0.4
   @nx/workspace      : 18.0.4
   @nx/angular        : 18.0.4
   @nx/cypress        : 18.0.4
   @nx/devkit         : 18.0.4
   @nx/eslint-plugin  : 18.0.4
   @nx/react          : 18.0.4
   @nrwl/tao          : 18.0.4
   @nx/vite           : 18.0.4
   @nx/web            : 18.0.4
   @nx/webpack        : 18.0.4
   typescript         : 5.3.3
   ---------------------------------------
   Community plugins:
   @ngrx/component-store : 17.0.1
   @ngrx/effects         : 17.0.1
   @ngrx/entity          : 17.0.1
   @ngrx/router-store    : 17.0.1
   @ngrx/store           : 17.0.1
   @ngrx/store-devtools  : 17.0.1

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Got the same in a completely fresh integrated repo using pnpm

@FrozenPandaz FrozenPandaz added the scope: react Issues related to React support for Nx label Mar 15, 2024
FrozenPandaz pushed a commit that referenced this issue May 21, 2024
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: react Issues related to React support for Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants