test: speed up channel plugin tests

This commit is contained in:
Peter Steinberger
2026-04-07 13:36:48 +01:00
parent 46db833772
commit 4b8bca3444
3 changed files with 8 additions and 25 deletions

View File

@@ -1,4 +1,6 @@
import { beforeAll, describe, expect, it, vi } from "vitest";
import { describe, expect, it, vi } from "vitest";
import { nextcloudTalkPlugin } from "./channel.js";
import { NextcloudTalkConfigSchema } from "./config-schema.js";
import type { CoreConfig } from "./types.js";
vi.mock("../../../test/helpers/config/bundled-channel-config-runtime.js", () => ({
@@ -11,14 +13,6 @@ vi.mock("../../../src/channels/plugins/bundled.js", () => ({
bundledChannelSetupPlugins: [],
}));
let nextcloudTalkPlugin: typeof import("./channel.js").nextcloudTalkPlugin;
let NextcloudTalkConfigSchema: typeof import("./config-schema.js").NextcloudTalkConfigSchema;
beforeAll(async () => {
({ nextcloudTalkPlugin } = await import("./channel.js"));
({ NextcloudTalkConfigSchema } = await import("./config-schema.js"));
});
describe("nextcloud talk channel core", () => {
it("accepts SecretRef botSecret and apiPassword at top-level", () => {
const result = NextcloudTalkConfigSchema.safeParse({