feat: add OpenCode/Codex outputs and update changelog (#104)
* Add OpenCode converter coverage and specs * Add Codex target support and spec docs * Generate Codex command skills and refresh spec docs * Add global Codex install path * fix: harden plugin path loading and codex descriptions * feat: ensure codex agents block on convert/install * docs: clarify target branch usage for review * chore: prep npm package metadata and release notes * docs: mention opencode and codex in changelog * docs: update CLI usage and remove stale todos * feat: install from GitHub with global outputs
This commit is contained in:
20
tests/frontmatter.test.ts
Normal file
20
tests/frontmatter.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { formatFrontmatter, parseFrontmatter } from "../src/utils/frontmatter"
|
||||
|
||||
describe("frontmatter", () => {
|
||||
test("parseFrontmatter returns body when no frontmatter", () => {
|
||||
const raw = "Hello\nWorld"
|
||||
const result = parseFrontmatter(raw)
|
||||
expect(result.data).toEqual({})
|
||||
expect(result.body).toBe(raw)
|
||||
})
|
||||
|
||||
test("formatFrontmatter round trips", () => {
|
||||
const body = "Body text"
|
||||
const formatted = formatFrontmatter({ name: "agent", description: "Test" }, body)
|
||||
const parsed = parseFrontmatter(formatted)
|
||||
expect(parsed.data.name).toBe("agent")
|
||||
expect(parsed.data.description).toBe("Test")
|
||||
expect(parsed.body.trim()).toBe(body)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user