initial commit
This commit is contained in:
20
src/prompts.test.ts
Normal file
20
src/prompts.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
||||
|
||||
test("package.json exposes the extension and workflow prompt templates", () => {
|
||||
const packageJson = JSON.parse(readFileSync(join(packageRoot, "package.json"), "utf8"));
|
||||
|
||||
assert.deepEqual(packageJson.pi.extensions, ["./index.ts"]);
|
||||
assert.deepEqual(packageJson.pi.prompts, ["./prompts/*.md"]);
|
||||
|
||||
for (const name of ["implement.md", "scout-and-plan.md", "implement-and-review.md"]) {
|
||||
const content = readFileSync(join(packageRoot, "prompts", name), "utf8");
|
||||
assert.match(content, /^---\ndescription:/m);
|
||||
assert.match(content, /subagent/);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user