Fix MVP audit evidence pipeline
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import test from "node:test";
|
||||
|
||||
import { LOCAL_AUDIT_SKILL_REGISTRY_SOURCE } from "../lib/ai/local-audit-skill-registry";
|
||||
import { parseSkillsRegistry, toAuditUsedSkill } from "../lib/skills-registry";
|
||||
|
||||
test("parseSkillsRegistry parses v3 yaml metablocks from v2 source", async () => {
|
||||
const source = await readFile(join(process.cwd(), "v2_elemente", "skills.md"), "utf8");
|
||||
|
||||
const parsed = parseSkillsRegistry(source);
|
||||
test("parseSkillsRegistry parses v3 yaml metablocks from the MVP registry source", () => {
|
||||
const parsed = parseSkillsRegistry(LOCAL_AUDIT_SKILL_REGISTRY_SOURCE);
|
||||
|
||||
assert.equal(parsed.length, 9);
|
||||
const visualDesign = parsed.find((entry) => entry.id === "visual-design");
|
||||
@@ -28,9 +25,8 @@ test("parseSkillsRegistry parses v3 yaml metablocks from v2 source", async () =>
|
||||
assert.match(instructions, /Beurteile den ersten visuellen Eindruck/);
|
||||
});
|
||||
|
||||
test("toAuditUsedSkill exposes stable ids for v3 registry entries", async () => {
|
||||
const source = await readFile(join(process.cwd(), "v2_elemente", "skills.md"), "utf8");
|
||||
const parsed = parseSkillsRegistry(source);
|
||||
test("toAuditUsedSkill exposes stable ids for v3 registry entries", () => {
|
||||
const parsed = parseSkillsRegistry(LOCAL_AUDIT_SKILL_REGISTRY_SOURCE);
|
||||
const skill = parsed.find((entry) => entry.id === "contact-conversion");
|
||||
|
||||
assert.ok(skill);
|
||||
@@ -40,9 +36,8 @@ test("toAuditUsedSkill exposes stable ids for v3 registry entries", async () =>
|
||||
});
|
||||
});
|
||||
|
||||
test("parseSkillsRegistry does not infer categories for v3 entries without explicit metadata", async () => {
|
||||
const source = await readFile(join(process.cwd(), "v2_elemente", "skills.md"), "utf8");
|
||||
const parsed = parseSkillsRegistry(source);
|
||||
test("parseSkillsRegistry does not infer categories for v3 entries without explicit metadata", () => {
|
||||
const parsed = parseSkillsRegistry(LOCAL_AUDIT_SKILL_REGISTRY_SOURCE);
|
||||
const skill = parsed.find((entry) => entry.id === "performance-experience");
|
||||
|
||||
assert.ok(skill);
|
||||
|
||||
Reference in New Issue
Block a user