30 lines
915 B
TypeScript
30 lines
915 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import {
|
|
ROUTE_REGISTRY,
|
|
ROUTE_RUNTIME_CONTRACT,
|
|
} from "../../src/features/installed-feature-contracts.ts";
|
|
import { ROUTE_RUNTIME } from "../../src/features/installed-feature-runtimes.tsx";
|
|
import { parseRouteInput } from "../../src/presentation/routes/route-codecs.ts";
|
|
|
|
describe("typed installed route catalog", () => {
|
|
it("keeps contract and executable runtime contributions complete", () => {
|
|
expect(Object.keys(ROUTE_RUNTIME_CONTRACT).sort()).toEqual(
|
|
Object.keys(ROUTE_REGISTRY).sort(),
|
|
);
|
|
expect(Object.keys(ROUTE_RUNTIME).sort()).toEqual(
|
|
Object.keys(ROUTE_REGISTRY).sort(),
|
|
);
|
|
});
|
|
|
|
it("accepts the platform not-found splat owner", () => {
|
|
expect(
|
|
parseRouteInput(
|
|
"NOT_FOUND",
|
|
{ "*": "missing/path" },
|
|
new URLSearchParams(),
|
|
),
|
|
).toMatchObject({ success: true });
|
|
});
|
|
});
|