MCPcopy Create free account
hub / github.com/ding113/claude-code-hub / createCoverageConfig

Function createCoverageConfig

tests/vitest.base.ts:86–117  ·  view source on GitHub ↗
(opts: CoverageConfigOptions)

Source from the content-addressed store, hash-verified

84}
85
86export function createCoverageConfig(opts: CoverageConfigOptions) {
87 return defineConfig({
88 test: {
89 globals: true,
90 environment: opts.environment,
91 setupFiles,
92 include: opts.testFiles,
93 exclude: opts.testExclude ?? defaultTestExclude,
94 coverage: {
95 provider: "v8",
96 reporter: opts.coverageReporters ?? ["text", "html", "json"],
97 reportsDirectory: path.resolve(root, `coverage/${opts.name}`),
98 include: opts.sourceFiles,
99 exclude: [
100 "node_modules/",
101 "tests/",
102 "**/*.d.ts",
103 ".next/",
104 ...(opts.coverageExclude ?? []),
105 ],
106 thresholds: opts.thresholds,
107 },
108 reporters: ["verbose"],
109 isolate: true,
110 mockReset: true,
111 restoreMocks: true,
112 clearMocks: true,
113 resolveSnapshotPath,
114 },
115 resolve: sharedResolve(),
116 });
117}
118
119// ---------------------------------------------------------------------------
120// Factory: test runner config (e2e / integration)

Calls 1

sharedResolveFunction · 0.85

Tested by

no test coverage detected