MCPcopy
hub / github.com/tobi/qmd / createIsolatedTestEnv

Function createIsolatedTestEnv

test/cli.test.ts:93–100  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

91
92// Create an isolated test environment (db + config dir)
93async function createIsolatedTestEnv(prefix: string): Promise<{ dbPath: string; configDir: string }> {
94 testCounter++;
95 const dbPath = join(testDir, `${prefix}-${testCounter}.sqlite`);
96 const configDir = join(testDir, `${prefix}-config-${testCounter}`);
97 await mkdir(configDir, { recursive: true });
98 await writeFile(join(configDir, "index.yml"), "collections: {}\n");
99 return { dbPath, configDir };
100}
101
102// Setup test fixtures
103beforeAll(async () => {

Callers 1

cli.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected