MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / defineVitestConfig

Function defineVitestConfig

packages/tooling/src/vitest.ts:21–43  ·  view source on GitHub ↗
(options: VitestPackageOptions = {})

Source from the content-addressed store, hash-verified

19}
20
21export function defineVitestConfig(options: VitestPackageOptions = {}) {
22 const pkg = JSON.parse(readFileSync(path.join(process.cwd(), 'package.json'), 'utf8'));
23 const reporters =
24 process.env.GITHUB_ACTIONS === 'true'
25 ? ['default', 'github-actions', new SummaryLabelReporter(pkg.name)]
26 : ['default'];
27 return defineConfig({
28 resolve: {
29 tsconfigPaths: true,
30 alias: buildTsconfigAliases(process.cwd())
31 },
32 test: {
33 include: ['test/**/*.test.ts'],
34 testTimeout: options.testTimeout ?? 30000,
35 setupFiles: options.setupFiles,
36 passWithNoTests: true,
37 chaiConfig: options.truncateThreshold !== undefined
38 ? { truncateThreshold: options.truncateThreshold }
39 : undefined,
40 reporters
41 }
42 });
43}

Callers 9

vitest.config.tsFile · 0.90
vitest.config.tsFile · 0.90
vitest.config.tsFile · 0.90
vitest.config.tsFile · 0.90
vitest.config.tsFile · 0.90
vitest.config.tsFile · 0.90
vitest.config.tsFile · 0.90
vitest.config.tsFile · 0.90
vitest.config.tsFile · 0.90

Calls 3

buildTsconfigAliasesFunction · 0.90
parseMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected