test: expand frontmatter coverage

This commit is contained in:
Peter Steinberger
2026-01-17 19:58:53 +00:00
parent 4fdecfb845
commit 1309fc1f48
2 changed files with 48 additions and 0 deletions

View File

@@ -256,4 +256,20 @@ metadata:
expect(clawdbot?.requires?.config).toEqual(["workspace.dir"]);
expect(clawdbot?.install?.[0].kind).toBe("bundled");
});
it("parses YAML metadata map", () => {
const content = `---
name: yaml-metadata
metadata:
clawdbot:
emoji: disk
events:
- command:new
---
`;
const frontmatter = parseFrontmatter(content);
const clawdbot = resolveClawdbotMetadata(frontmatter);
expect(clawdbot?.emoji).toBe("disk");
expect(clawdbot?.events).toEqual(["command:new"]);
});
});