



















@@ -140,9 +140,11 @@ describe("plugins cli update", () => {
140140);
141141expect(writeConfigFile).toHaveBeenCalledWith(nextConfig);
142142expect(refreshPluginRegistry).not.toHaveBeenCalled();
143-expect(
144-runtimeLogs.some((line) => line.includes("Restart the gateway to load plugins and hooks.")),
145-).toBe(true);
143+expect(runtimeLogs).toEqual(
144+expect.arrayContaining([
145+expect.stringContaining("Restart the gateway to load plugins and hooks."),
146+]),
147+);
146148});
147149148150it("exits when update is called without id and without --all", async () => {
@@ -253,9 +255,11 @@ describe("plugins cli update", () => {
253255installRecords: nextConfig.plugins?.installs,
254256reason: "source-changed",
255257});
256-expect(
257-runtimeLogs.some((line) => line.includes("Restart the gateway to load plugins and hooks.")),
258-).toBe(true);
258+expect(runtimeLogs).toEqual(
259+expect.arrayContaining([
260+expect.stringContaining("Restart the gateway to load plugins and hooks."),
261+]),
262+);
259263});
260264261265it("exits non-zero when a plugin update reports an error after persisting successes", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。