mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-20 00:12:50 +00:00
* refactor(integrations): split TypeScript host plugins * feat(integrations): refresh host compatibility and status UI * fix(openclaw): secure status diagnostics
26 lines
761 B
JavaScript
26 lines
761 B
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { parseMarkdownFrontmatter } from "../dist/client/frontmatter.js";
|
|
|
|
test("separates top-level frontmatter from Markdown content", () => {
|
|
assert.deepEqual(
|
|
parseMarkdownFrontmatter(
|
|
"---\nname: oauth2\ndescription: delegated authorization\n framework\n---\n# OAuth 2.0",
|
|
),
|
|
{
|
|
body: "# OAuth 2.0",
|
|
entries: [
|
|
{ key: "name", value: "oauth2" },
|
|
{ key: "description", value: "delegated authorization\nframework" },
|
|
],
|
|
},
|
|
);
|
|
});
|
|
|
|
test("keeps ordinary Markdown unchanged", () => {
|
|
assert.deepEqual(parseMarkdownFrontmatter("# Journal\n\nRemember this."), {
|
|
body: "# Journal\n\nRemember this.",
|
|
entries: [],
|
|
});
|
|
});
|