mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 12:00:45 +00:00
test: tighten plugin lookup metrics assertions
This commit is contained in:
@@ -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"]);
|
||||
|
||||
Reference in New Issue
Block a user