init mcp tools test

This commit is contained in:
dswbx
2025-08-12 08:51:32 +02:00
parent 822e6fd644
commit 2e145bbf95
13 changed files with 233 additions and 51 deletions
+32
View File
@@ -0,0 +1,32 @@
import { describe, it, expect } from "bun:test";
import { createApp } from "core/test/utils";
import { getSystemMcp } from "modules/mcp/system-mcp";
import { registries } from "index";
import { StorageLocalAdapter } from "adapter/node/storage/StorageLocalAdapter";
describe("mcp", () => {
it("should have tools", async () => {
registries.media.register("local", StorageLocalAdapter);
const app = createApp({
initialConfig: {
auth: {
enabled: true,
},
media: {
enabled: true,
adapter: {
type: "local",
config: {
path: "./",
},
},
},
},
});
await app.build();
const server = getSystemMcp(app);
expect(server.tools.length).toBeGreaterThan(0);
});
});