import { describe, expect, it } from "vitest"; import { createReferenceFeatureInstalledInput } from "../../../src/features/reference-feature/adapters/create-reference-feature-input.ts"; /** * This assertion is about the reference feature, not about HTTP observability: * it names the feature's own route ids. It used to live in * `tests/integration/http-execution-v3-observability.test.ts`, which meant a * platform integration file imported the removable feature's installed input. * Removing the feature then left that file importing a deleted module, and the * removability fixture failed on typecheck, the unit/integration run, coverage * and residue at once — four symptoms of one misplaced test. */ describe("reference feature installed operation executor", () => { it("preserves the feature route id through the installed operation executor", async () => { const seen: Array>> = []; const installed = createReferenceFeatureInstalledInput({ contractOperations: Object.freeze({ async execute( _operationId: string, _input: unknown, context?: Readonly>, ) { seen.push(Object.freeze({ ...(context ?? {}) })); return Object.freeze({ kind: "SUCCESS" as const, value: [], metadata: Object.freeze({ status: 200 }), effect: "NOT_APPLICABLE" as const, }); }, }), }); await installed.input.listResources({ limit: 20 }); await installed.input.getResource("resource-1"); expect(seen.map((context) => context.routeId)).toEqual([ "REFERENCE_RESOURCE_LIST", "REFERENCE_RESOURCE_DETAIL", ]); }); });