



























@@ -1929,7 +1929,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
19291929onlyPluginIds: [],
19301930});
193119311932-expect(registry.plugins).toEqual([]);
1932+expect(registry.plugins).toStrictEqual([]);
19331933});
1934193419351935it("skips discovery and manifest registry loading entirely when onlyPluginIds is an explicit empty array", async () => {
@@ -1957,7 +1957,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
19571957onlyPluginIds: [],
19581958});
195919591960-expect(registry.plugins).toEqual([]);
1960+expect(registry.plugins).toStrictEqual([]);
19611961expect(discoverySpy).not.toHaveBeenCalled();
19621962expect(manifestSpy).not.toHaveBeenCalled();
19631963@@ -1999,7 +1999,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
1999199920002000expect(scoped.plugins.find((entry) => entry.id === "command-plugin")?.status).toBe("loaded");
20012001expect(scoped.commands.map((entry) => entry.command.name)).toEqual(["pair"]);
2002-expect(getPluginCommandSpecs("telegram")).toEqual([]);
2002+expect(getPluginCommandSpecs("telegram")).toStrictEqual([]);
2003200320042004const active = loadOpenClawPlugins({
20052005cache: false,
@@ -2065,7 +2065,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
20652065},
20662066},
20672067});
2068-expect(listAgentHarnessIds()).toEqual([]);
2068+expect(listAgentHarnessIds()).toStrictEqual([]);
20692069});
2070207020712071it("rejects malformed plugin agent harness registrations", () => {
@@ -2096,7 +2096,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
20962096onlyPluginIds: ["bad-harness"],
20972097});
209820982099-expect(listAgentHarnessIds()).toEqual([]);
2099+expect(listAgentHarnessIds()).toStrictEqual([]);
21002100expect(registry.diagnostics).toContainEqual(
21012101expect.objectContaining({
21022102level: "error",
@@ -2137,7 +2137,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
21372137"loaded",
21382138);
21392139expect(scoped.hooks.map((entry) => entry.entry.hook.name)).toEqual(["snapshot-hook"]);
2140-expect(getRegisteredEventKeys()).toEqual([]);
2140+expect(getRegisteredEventKeys()).toStrictEqual([]);
2141214121422142clearInternalHooks();
21432143});
@@ -2315,19 +2315,19 @@ module.exports = { id: "throws-after-import", register() {} };`,
23152315expect(registry.plugins.find((entry) => entry.id === "failing-side-effects")?.status).toBe(
23162316"error",
23172317);
2318-expect(getRegisteredEventKeys()).toEqual([]);
2319-expect(getPluginCommandSpecs()).toEqual([]);
2320-expect(registry.reloads).toEqual([]);
2321-expect(registry.nodeHostCommands).toEqual([]);
2322-expect(registry.nodeInvokePolicies).toEqual([]);
2323-expect(registry.securityAuditCollectors).toEqual([]);
2318+expect(getRegisteredEventKeys()).toStrictEqual([]);
2319+expect(getPluginCommandSpecs()).toStrictEqual([]);
2320+expect(registry.reloads).toStrictEqual([]);
2321+expect(registry.nodeHostCommands).toStrictEqual([]);
2322+expect(registry.nodeInvokePolicies).toStrictEqual([]);
2323+expect(registry.securityAuditCollectors).toStrictEqual([]);
23242324expect(resolvePluginInteractiveNamespaceMatch("slack", "failme:payload")).toBeNull();
23252325expect(getContextEngineFactory("failme-context")).toBeUndefined();
23262326expect(listContextEngineIds()).not.toContain("failme-context");
2327232723282328const event = createInternalHookEvent("gateway", "startup", "gateway:startup");
23292329await triggerInternalHook(event);
2330-expect(event.messages).toEqual([]);
2330+expect(event.messages).toStrictEqual([]);
2331233123322332clearInternalHooks();
23332333clearPluginCommands();
@@ -2365,8 +2365,8 @@ module.exports = { id: "throws-after-import", register() {} };`,
23652365expect(record?.status).toBe("error");
23662366expect(record?.failurePhase).toBe("register");
23672367expect(record?.error).toContain("hook registration missing name");
2368-expect(registry.hooks).toEqual([]);
2369-expect(getRegisteredEventKeys()).toEqual([]);
2368+expect(registry.hooks).toStrictEqual([]);
2369+expect(getRegisteredEventKeys()).toStrictEqual([]);
23702370expectDiagnosticContaining({
23712371 registry,
23722372level: "error",
@@ -2633,11 +2633,11 @@ module.exports = { id: "throws-after-import", register() {} };`,
26332633});
2634263426352635expect(registry.plugins.find((entry) => entry.id === "failing-memory")?.status).toBe("error");
2636-expect(buildMemoryPromptSection({ availableTools: new Set() })).toEqual([]);
2637-expect(listMemoryCorpusSupplements()).toEqual([]);
2636+expect(buildMemoryPromptSection({ availableTools: new Set() })).toStrictEqual([]);
2637+expect(listMemoryCorpusSupplements()).toStrictEqual([]);
26382638expect(resolveMemoryFlushPlan({})).toBeNull();
26392639expect(getMemoryRuntime()).toBeUndefined();
2640-expect(listMemoryEmbeddingProviders()).toEqual([]);
2640+expect(listMemoryEmbeddingProviders()).toStrictEqual([]);
26412641});
2642264226432643it("does not replace the active detached task runtime during non-activating loads", () => {
@@ -2827,7 +2827,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
2827282728282828clearPluginCommands();
28292829clearPluginInteractiveHandlerRegistrations();
2830-expect(getPluginCommandSpecs()).toEqual([]);
2830+expect(getPluginCommandSpecs()).toStrictEqual([]);
28312831expect(resolvePluginInteractiveNamespaceMatch("telegram", "hue:on")).toBeNull();
2832283228332833loadOpenClawPlugins(loadOptions);
@@ -3088,7 +3088,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
30883088},
30893089});
309030903091-expect(registry.tools).toEqual([]);
3091+expect(registry.tools).toStrictEqual([]);
30923092expect(registry.diagnostics).toEqual(
30933093expect.arrayContaining([
30943094expect.objectContaining({
@@ -3130,7 +3130,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
31303130},
31313131});
313231323133-expect(registry.tools).toEqual([]);
3133+expect(registry.tools).toStrictEqual([]);
31343134expect(registry.diagnostics).toEqual(
31353135expect.arrayContaining([
31363136expect.objectContaining({
@@ -3178,7 +3178,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
31783178expect(second).toBe(first);
31793179expect((globalThis as Record<string, unknown>)[marker]).toBe(1);
31803180expect(first.commands.map((entry) => entry.command.name)).toEqual(["snapshot-command"]);
3181-expect(getPluginCommandSpecs()).toEqual([]);
3181+expect(getPluginCommandSpecs()).toStrictEqual([]);
3182318231833183const active = loadOpenClawPlugins({
31843184workspaceDir: plugin.dir,
@@ -4081,7 +4081,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
40814081pluginId: "memory-prompt-supplement-malformed",
40824082message: "memory prompt supplement registration missing builder",
40834083});
4084-expect(listMemoryPromptSupplements()).toEqual([]);
4084+expect(listMemoryPromptSupplements()).toStrictEqual([]);
40854085},
40864086},
40874087{
@@ -4315,7 +4315,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
43154315expect(record?.gatewayDiscoveryServiceIds).toEqual(["shared-service"]);
43164316expect(registry.services).toHaveLength(1);
43174317expect(registry.gatewayDiscoveryServices).toHaveLength(1);
4318-expect(registry.diagnostics).toEqual([]);
4318+expect(registry.diagnostics).toStrictEqual([]);
43194319});
4320432043214321it("rewrites removed registerHttpHandler failures into migration diagnostics", () => {
@@ -4418,7 +4418,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
44184418);
44194419expect(routes).toHaveLength(1);
44204420expect(routes[0]?.path).toBe("/demo");
4421-expect(registry.diagnostics).toEqual([]);
4421+expect(registry.diagnostics).toStrictEqual([]);
44224422},
44234423},
44244424{
@@ -4489,7 +4489,7 @@ module.exports = { id: "throws-after-import", register() {} };`,
44894489(entry) => entry.pluginId === "http-route-overlap-same-auth",
44904490);
44914491expect(routes).toHaveLength(2);
4492-expect(registry.diagnostics).toEqual([]);
4492+expect(registry.diagnostics).toStrictEqual([]);
44934493},
44944494},
44954495] as const;
@@ -5620,7 +5620,7 @@ module.exports = {
56205620},
56215621});
562256225623-expect(registry.typedHooks).toEqual([]);
5623+expect(registry.typedHooks).toStrictEqual([]);
56245624const blockedDiagnostics = registry.diagnostics.filter((diag) =>
56255625diag.message.includes(
56265626"non-bundled plugins must set plugins.entries.conversation-hooks.hooks.allowConversationAccess=true",
@@ -6875,7 +6875,7 @@ module.exports = {
68756875},
68766876});
687768776878-expect(warnings).toEqual([]);
6878+expect(warnings).toStrictEqual([]);
68796879expectDiagnosticContaining({
68806880 registry,
68816881level: "warn",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。