nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
22.97k stars 2.3k forks source link

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

Closed thaiKari closed 3 months ago

thaiKari commented 5 months ago

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

Additional Information

Got the same in a completely fresh integrated repo using pnpm

github-actions[bot] commented 2 months ago

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.