test(server): silence the broken fixture plugin warning
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
348b04e928
commit
0a540208e1
1 file changed
+4
-1
@@ -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 { mkdtemp, rm } from "node:fs/promises";
|
||||||
import { tmpdir } from "node:os";
|
import { tmpdir } from "node:os";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
@@ -10,7 +10,10 @@ import { sessionCookie as buildSessionCookie } from "../src/http.ts";
|
|||||||
import { safeFilename } from "../src/routes/attachments.ts";
|
import { safeFilename } from "../src/routes/attachments.ts";
|
||||||
|
|
||||||
const ECHO_DIR = join(import.meta.dir, "../../../packages/core/test/fixtures/plugins");
|
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]);
|
const registry: PluginRegistry = await loadPlugins([ECHO_DIR]);
|
||||||
|
warn.mockRestore();
|
||||||
const BASE = "http://localhost/api/v1";
|
const BASE = "http://localhost/api/v1";
|
||||||
|
|
||||||
type App = ReturnType<typeof createApp>;
|
type App = ReturnType<typeof createApp>;
|
||||||
|
|||||||
Reference in new issue
Block a user