Files
reverse-engineering-anything/tests/fixtures/cliMcpEvidenceParity.ts
T
gensokyo-dev 5303199163 feat(api-contract): inspect local GraphQL SDL and field references (#9140)
* feat(api-contract): inspect local GraphQL SDL and field references

* fix(api-contract): retain caller metadata and bound selection work
2026-11-06 20:16:31 +08:00

22 lines
712 B
TypeScript

import { expect } from "vitest";
import { parseEvidence } from "../../src/domain/evidence.js";
/** Compare complete Evidence while asserting the CLI-only caller spelling. */
export const expectCliMcpEvidenceParity = (
cli: unknown,
mcp: unknown,
callerPath: string,
auxiliaryPaths?: Readonly<Record<string, string>>,
): void => {
const {
caller_input_path: callerInputPath,
caller_input_paths: callerInputPaths,
...shared
} = parseEvidence(cli);
expect(callerInputPath).toBe(callerPath);
expect(callerInputPaths).toEqual(auxiliaryPaths);
expect(mcp).not.toHaveProperty("caller_input_path");
expect(mcp).not.toHaveProperty("caller_input_paths");
expect(mcp).toEqual(shared);
};