mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:00:43 +00:00
28 lines
863 B
TypeScript
28 lines
863 B
TypeScript
import path from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
import { loadOpenClawPlugins } from "./loader.js";
|
|
|
|
describe("source checkout bundled plugin runtime", () => {
|
|
it("loads enabled bundled plugins from the pnpm workspace source tree", () => {
|
|
const registry = loadOpenClawPlugins({
|
|
cache: false,
|
|
onlyPluginIds: ["twitch"],
|
|
config: {
|
|
plugins: {
|
|
entries: {
|
|
twitch: { enabled: true },
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
const twitch = registry.plugins.find((plugin) => plugin.id === "twitch");
|
|
expect(twitch).toMatchObject({
|
|
status: "loaded",
|
|
origin: "bundled",
|
|
});
|
|
expect(twitch?.source).toContain(`${path.sep}extensions${path.sep}twitch${path.sep}index.ts`);
|
|
expect(twitch?.rootDir).toContain(`${path.sep}extensions${path.sep}twitch`);
|
|
});
|
|
});
|