mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-17 13:00:48 +00:00
Tests: isolate bundle surface fixtures
This commit is contained in:
@@ -393,7 +393,9 @@ describe("bundle plugins", () => {
|
||||
});
|
||||
|
||||
it("treats Claude command roots and settings as supported bundle surfaces", () => {
|
||||
useNoBundledPlugins();
|
||||
const workspaceDir = makeTempDir();
|
||||
const stateDir = makeTempDir();
|
||||
const bundleRoot = path.join(workspaceDir, ".openclaw", "extensions", "claude-skills");
|
||||
mkdirSafe(path.join(bundleRoot, "commands"));
|
||||
fs.writeFileSync(
|
||||
@@ -402,19 +404,22 @@ describe("bundle plugins", () => {
|
||||
);
|
||||
fs.writeFileSync(path.join(bundleRoot, "settings.json"), '{"hideThinkingBlock":true}', "utf-8");
|
||||
|
||||
const registry = loadOpenClawPlugins({
|
||||
workspaceDir,
|
||||
config: {
|
||||
plugins: {
|
||||
entries: {
|
||||
"claude-skills": {
|
||||
enabled: true,
|
||||
const registry = withEnv({ OPENCLAW_STATE_DIR: stateDir }, () =>
|
||||
loadOpenClawPlugins({
|
||||
workspaceDir,
|
||||
onlyPluginIds: ["claude-skills"],
|
||||
config: {
|
||||
plugins: {
|
||||
entries: {
|
||||
"claude-skills": {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
cache: false,
|
||||
});
|
||||
cache: false,
|
||||
}),
|
||||
);
|
||||
|
||||
const plugin = registry.plugins.find((entry) => entry.id === "claude-skills");
|
||||
expect(plugin?.status).toBe("loaded");
|
||||
@@ -432,7 +437,9 @@ describe("bundle plugins", () => {
|
||||
});
|
||||
|
||||
it("treats Cursor command roots as supported bundle skill surfaces", () => {
|
||||
useNoBundledPlugins();
|
||||
const workspaceDir = makeTempDir();
|
||||
const stateDir = makeTempDir();
|
||||
const bundleRoot = path.join(workspaceDir, ".openclaw", "extensions", "cursor-skills");
|
||||
mkdirSafe(path.join(bundleRoot, ".cursor-plugin"));
|
||||
mkdirSafe(path.join(bundleRoot, ".cursor", "commands"));
|
||||
@@ -448,19 +455,22 @@ describe("bundle plugins", () => {
|
||||
"---\ndescription: fixture\n---\n",
|
||||
);
|
||||
|
||||
const registry = loadOpenClawPlugins({
|
||||
workspaceDir,
|
||||
config: {
|
||||
plugins: {
|
||||
entries: {
|
||||
"cursor-skills": {
|
||||
enabled: true,
|
||||
const registry = withEnv({ OPENCLAW_STATE_DIR: stateDir }, () =>
|
||||
loadOpenClawPlugins({
|
||||
workspaceDir,
|
||||
onlyPluginIds: ["cursor-skills"],
|
||||
config: {
|
||||
plugins: {
|
||||
entries: {
|
||||
"cursor-skills": {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
cache: false,
|
||||
});
|
||||
cache: false,
|
||||
}),
|
||||
);
|
||||
|
||||
const plugin = registry.plugins.find((entry) => entry.id === "cursor-skills");
|
||||
expect(plugin?.status).toBe("loaded");
|
||||
|
||||
Reference in New Issue
Block a user