MCPcopy Create free account
hub / github.com/Effect-TS/effect / project

Function project

vitest.config.ts:22–42  ·  view source on GitHub ↗
(
  name: string,
  directory: string,
  include: boolean = true,
  config: ViteUserConfig = {}
)

Source from the content-addressed store, hash-verified

20// Use `test.dir` to share the root Vite server and transform cache.
21// Projects that override Vite options get their own server.
22const project = (
23 name: string,
24 directory: string,
25 include: boolean = true,
26 config: ViteUserConfig = {}
27) => {
28 if (!include) {
29 return []
30 }
31
32 const merged = mergeConfig({
33 test: {
34 name,
35 dir: path.join(import.meta.dirname, directory)
36 }
37 }, config)
38 // Apply defaults here because mergeConfig concatenates arrays.
39 merged.test!.include ??= ["test/**/*.test.{ts,tsx}"]
40 merged.test!.exclude ??= [...exclude]
41 return [merged]
42}
43
44export const exclude = [
45 "**/.*/**",

Callers 1

vitest.config.tsFile · 0.70

Calls 2

mergeConfigFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected