test: tighten plugin lookup metrics assertions

This commit is contained in:
Peter Steinberger
2026-05-09 04:16:23 +01:00
parent b2507b9a79
commit 2a70264b83

View File

@@ -225,16 +225,20 @@ describe("loadPluginLookUpTable", () => {
expect(table.manifestRegistry).toBe(manifestRegistry);
expect(table.diagnostics).toEqual([indexDiagnostic, manifestDiagnostic]);
expect(table.metrics).toMatchObject({
registrySnapshotMs: expect.any(Number),
manifestRegistryMs: expect.any(Number),
startupPlanMs: expect.any(Number),
ownerMapsMs: expect.any(Number),
totalMs: expect.any(Number),
indexPluginCount: 2,
manifestPluginCount: 2,
startupPluginCount: 1,
deferredChannelPluginCount: 0,
});
for (const metricName of [
"registrySnapshotMs",
"manifestRegistryMs",
"startupPlanMs",
"ownerMapsMs",
"totalMs",
] as const) {
expect(table.metrics[metricName]).toBeGreaterThanOrEqual(0);
}
expect(table.byPluginId.get("telegram")?.id).toBe("telegram");
expect(table.normalizePluginId("openai-codex")).toBe("openai");
expect(table.owners.channels.get("telegram")).toEqual(["telegram"]);