Skip to content

Commit

Permalink
fix(bundling): if bundler is vite unitTestRunner is vitest (#13436)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini committed Nov 28, 2022
1 parent 9a0db48 commit 871f618
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/generators/application/application.ts
Expand Up @@ -116,6 +116,7 @@ export async function applicationGenerator(host: Tree, schema: Schema) {

const cypressTask = await addCypress(host, options);
tasks.push(cypressTask);

if (options.unitTestRunner === 'jest') {
const jestTask = await addJest(host, options);
tasks.push(jestTask);
Expand Down
Expand Up @@ -40,6 +40,10 @@ export function normalizeOptions(

assertValidStyle(options.style);

if (options.bundler === 'vite') {
options.unitTestRunner = 'vitest';
}

const normalized = {
...options,
name: names(options.name).fileName,
Expand Down

0 comments on commit 871f618

Please sign in to comment.