Skip to content

Commit b0966f5

Browse files
committed
test: clarify plugin uninstall log assertions
1 parent f82d842 commit b0966f5

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/cli/plugins-cli.uninstall.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,12 @@ describe("plugins cli uninstall", () => {
104104
expect(planPluginUninstall).toHaveBeenCalled();
105105
expect(writeConfigFile).not.toHaveBeenCalled();
106106
expect(refreshPluginRegistry).not.toHaveBeenCalled();
107-
expect(runtimeLogs.some((line) => line.includes("Dry run, no changes made."))).toBe(true);
108-
expect(runtimeLogs.some((line) => line.includes("context engine slot"))).toBe(true);
107+
expect(runtimeLogs).toEqual(
108+
expect.arrayContaining([expect.stringContaining("Dry run, no changes made.")]),
109+
);
110+
expect(runtimeLogs).toEqual(
111+
expect.arrayContaining([expect.stringContaining("context engine slot")]),
112+
);
109113
});
110114

111115
it("uninstalls with --force and --keep-files without prompting", async () => {
@@ -515,7 +519,9 @@ describe("plugins cli uninstall", () => {
515519
);
516520
expect(writePersistedInstalledPluginIndexInstallRecords).toHaveBeenCalledWith({});
517521
expect(writeConfigFile).toHaveBeenCalledWith(nextConfig);
518-
expect(runtimeLogs.some((line) => line.includes("channel config (channels.alpha)"))).toBe(true);
522+
expect(runtimeLogs).toEqual(
523+
expect.arrayContaining([expect.stringContaining("channel config (channels.alpha)")]),
524+
);
519525
expect(runtimeLogs.at(-2)).toContain('Uninstalled plugin "alpha"');
520526
});
521527

0 commit comments

Comments
 (0)