MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / createProjectCountReporter

Function createProjectCountReporter

web/src/test/vitestProjects.ts:228–243  ·  view source on GitHub ↗
(log: (message: string) => void = console.log)

Source from the content-addressed store, hash-verified

226 * what fails a run; this makes a narrowed run legible.
227 */
228export function createProjectCountReporter(log: (message: string) => void = console.log) {
229 let registered: string[] = [];
230 return {
231 onInit(context: ProjectCountReporterContext) {
232 registered = context.projects.map((project) => project.name);
233 },
234 onTestRunEnd(testModules: readonly ProjectCountReporterModule[]) {
235 const counts = new Map<string, number>();
236 for (const testModule of testModules) {
237 const name = testModule.project.name;
238 counts.set(name, (counts.get(name) ?? 0) + 1);
239 }
240 log(formatProjectRunSummary(registered, counts));
241 },
242 };
243}

Callers 2

vitest.config.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected