From fcf31eef647fd59648584d3c9f2a8aaf8b0924b6 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 11 Apr 2026 05:06:40 +0100 Subject: [PATCH] test: narrow whatsapp auto-enable validation --- src/config/plugin-auto-enable.core.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/plugin-auto-enable.core.test.ts b/src/config/plugin-auto-enable.core.test.ts index 707ec18514e..5e27ccc1ca3 100644 --- a/src/config/plugin-auto-enable.core.test.ts +++ b/src/config/plugin-auto-enable.core.test.ts @@ -12,7 +12,7 @@ import { resetPluginAutoEnableTestState, writePluginManifestFixture, } from "./plugin-auto-enable.test-helpers.js"; -import { validateConfigObject } from "./validation.js"; +import { WhatsAppConfigSchema } from "./zod-schema.providers-whatsapp.js"; afterEach(() => { resetPluginAutoEnableTestState(); @@ -282,7 +282,7 @@ describe("applyPluginAutoEnable core", () => { }); expect(result.config.channels?.whatsapp?.enabled).toBe(true); - expect(validateConfigObject(result.config).ok).toBe(true); + expect(WhatsAppConfigSchema.safeParse(result.config.channels?.whatsapp).success).toBe(true); }); it("appends built-in WhatsApp to restrictive plugins.allow during auto-enable", () => { @@ -302,7 +302,7 @@ describe("applyPluginAutoEnable core", () => { expect(result.config.channels?.whatsapp?.enabled).toBe(true); expect(result.config.plugins?.allow).toEqual(["telegram", "whatsapp"]); - expect(validateConfigObject(result.config).ok).toBe(true); + expect(WhatsAppConfigSchema.safeParse(result.config.channels?.whatsapp).success).toBe(true); }); it("preserves configured plugin entries in restrictive plugins.allow", () => {