test(server): silence the broken fixture plugin warning

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Lucas Winther
2026-10-30 21:19:08 +01:00
co-authored by Claude Opus 5.5
parent 348b04e928
commit 0a540208e1
+4 -1
View File
@@ -1,4 +1,4 @@
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
import { afterEach, beforeEach, describe, expect, spyOn, test } from "bun:test";
import { mkdtemp, rm } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
@@ -10,7 +10,10 @@ import { sessionCookie as buildSessionCookie } from "../src/http.ts";
import { safeFilename } from "../src/routes/attachments.ts";
const ECHO_DIR = join(import.meta.dir, "../../../packages/core/test/fixtures/plugins");
// The fixture dir also holds a deliberately broken plugin; silence its load warning.
const warn = spyOn(console, "warn").mockImplementation(() => {});
const registry: PluginRegistry = await loadPlugins([ECHO_DIR]);
warn.mockRestore();
const BASE = "http://localhost/api/v1";
type App = ReturnType<typeof createApp>;