Skip to content

Commit

Permalink
feat: remove synth-time dependency to vitest configDefaults
Browse files Browse the repository at this point in the history
  • Loading branch information
nikovirtala committed Jan 26, 2025
1 parent 296eb23 commit 9d2cccf
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from "projen/lib/component";
import { DependencyType } from "projen/lib/dependencies";
import { Jest, NodeProject } from "projen/lib/javascript";
import { TextFile } from "projen/lib/textfile";
import { configDefaults } from "vitest/config";

export enum Environment {
/**
Expand Down Expand Up @@ -298,8 +297,16 @@ export class Vitest extends Component {
super(project);

this.configFilePath = options.configFilePath ?? "vitest.config.ts";
this.include = new Set(options.config?.include ?? [...configDefaults.include]);
this.exclude = new Set(options.config?.exclude ?? [...configDefaults.exclude]);
this.include = new Set(options.config?.include ?? ["**/*.{test,spec}.?(c|m)[jt]s?(x)"]);
this.exclude = new Set(
options.config?.exclude ?? [
"**/node_modules/**",
"**/dist/**",
"**/cypress/**",
"**/.{idea,git,cache,output,temp}/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*",
],
);
this.isolate = options.config?.isolate ?? true;
this.pool = options.config?.pool ?? Pool.FORKS;
this.coverageEnabled = options.config?.coverageEnabled ?? true;
Expand Down

0 comments on commit 9d2cccf

Please sign in to comment.