MCPcopy Create free account
hub / github.com/CopilotKit/aimock / loadFixtures

Function loadFixtures

src/jest.ts:109–122  ·  view source on GitHub ↗
(fixturePath: string)

Source from the content-addressed store, hash-verified

107}
108
109function loadFixtures(fixturePath: string): Fixture[] {
110 try {
111 const stat = statSync(fixturePath);
112 if (stat.isDirectory()) {
113 return loadFixturesFromDir(fixturePath);
114 }
115 return loadFixtureFile(fixturePath);
116 } catch (err) {
117 console.warn(
118 `[aimock] Failed to load fixtures from ${fixturePath}: ${err instanceof Error ? err.message : String(err)}`,
119 );
120 return [];
121 }
122}
123
124export { LLMock } from "./llmock.js";
125export type { MockServerOptions, Fixture } from "./types.js";

Callers 1

useAimockFunction · 0.70

Calls 3

loadFixturesFromDirFunction · 0.85
loadFixtureFileFunction · 0.85
warnMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…