test: avoid whatsapp setup jiti load

This commit is contained in:
Peter Steinberger
2026-04-24 12:26:48 +01:00
parent 11fa1d2dc7
commit ebd7f19a3b

View File

@@ -7,8 +7,9 @@ vi.mock("@whiskeysockets/baileys", () => {
describe("whatsapp setup entry", () => {
it("loads the setup plugin without installing or importing runtime dependencies", async () => {
const { default: setupEntry } = await import("./setup-entry.js");
const { whatsappSetupPlugin } = await import("./setup-plugin-api.js");
expect(setupEntry.kind).toBe("bundled-channel-setup-entry");
expect(setupEntry.loadSetupPlugin({ installRuntimeDeps: false }).id).toBe("whatsapp");
expect(whatsappSetupPlugin.id).toBe("whatsapp");
});
});