MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / convertTests

Function convertTests

vitest.config.ts:19–42  ·  view source on GitHub ↗
(
  projects: unknown[],
  root: string,
)

Source from the content-addressed store, hash-verified

17});
18
19function convertTests(
20 projects: unknown[],
21 root: string,
22): UserWorkspaceConfig[] {
23 return (projects as UserWorkspaceConfig[]).map((it) => {
24 const test = it.test ?? {};
25 const name: string | { label: string } = test.name ?? "unknown";
26 copySolidPlugin(it);
27
28 let updatedName =
29 name === null || typeof name === "string"
30 ? `${name}-${root}`
31 : { ...name, label: `${name.label}-${root}` };
32
33 return {
34 ...it,
35 test: {
36 ...test,
37 root,
38 name: updatedName,
39 },
40 } as UserWorkspaceConfig;
41 });
42}
43
44/**
45 * Tests for solidJs need the solid plugin to run on config level and on test level. idk why

Callers 1

vitest.config.tsFile · 0.85

Calls 1

copySolidPluginFunction · 0.85

Tested by

no test coverage detected