mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 22:34:32 +00:00
test: migrate suites to e2e coverage layout
This commit is contained in:
19
src/agents/skills/frontmatter.e2e.test.ts
Normal file
19
src/agents/skills/frontmatter.e2e.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveSkillInvocationPolicy } from "./frontmatter.js";
|
||||
|
||||
describe("resolveSkillInvocationPolicy", () => {
|
||||
it("defaults to enabled behaviors", () => {
|
||||
const policy = resolveSkillInvocationPolicy({});
|
||||
expect(policy.userInvocable).toBe(true);
|
||||
expect(policy.disableModelInvocation).toBe(false);
|
||||
});
|
||||
|
||||
it("parses frontmatter boolean strings", () => {
|
||||
const policy = resolveSkillInvocationPolicy({
|
||||
"user-invocable": "no",
|
||||
"disable-model-invocation": "yes",
|
||||
});
|
||||
expect(policy.userInvocable).toBe(false);
|
||||
expect(policy.disableModelInvocation).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user