MCPcopy
hub / github.com/Fission-AI/OpenSpec / prepareFixture

Function prepareFixture

test/cli-e2e/basic.test.ts:19–27  ·  view source on GitHub ↗
(fixtureName: string)

Source from the content-addressed store, hash-verified

17const tempRoots: string[] = [];
18
19async function prepareFixture(fixtureName: string): Promise<string> {
20 const base = await fs.mkdtemp(path.join(tmpdir(), 'openspec-cli-e2e-'));
21 tempRoots.push(base);
22 const projectDir = path.join(base, 'project');
23 await fs.mkdir(projectDir, { recursive: true });
24 const fixtureDir = path.join(cliProjectRoot, 'test', 'fixtures', fixtureName);
25 await fs.cp(fixtureDir, projectDir, { recursive: true });
26 return projectDir;
27}
28
29function expectJsonOnlyOutput(result: Awaited<ReturnType<typeof runCLI>>) {
30 expect(result.exitCode).toBe(0);

Callers 1

basic.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected