feat: 将 task 从 plan 文档提升为独立 SDD 阶段
This commit is contained in:
@@ -2,9 +2,10 @@ import { describe, it, expect } from "bun:test";
|
||||
import { defaultConfig } from "../../src/defaults/config.ts";
|
||||
|
||||
describe("defaultConfig", () => {
|
||||
it("包含所有四个阶段的配置", () => {
|
||||
it("包含所有五个阶段的配置", () => {
|
||||
expect(defaultConfig.stages.discuss).toBeDefined();
|
||||
expect(defaultConfig.stages.plan).toBeDefined();
|
||||
expect(defaultConfig.stages.task).toBeDefined();
|
||||
expect(defaultConfig.stages.build).toBeDefined();
|
||||
expect(defaultConfig.stages.archive).toBeDefined();
|
||||
});
|
||||
@@ -42,25 +43,11 @@ describe("defaultConfig", () => {
|
||||
expect(prompt).toContain("task.md");
|
||||
});
|
||||
|
||||
it("plan 阶段包含 design 和 task 两个文档配置", () => {
|
||||
it("plan 阶段包含 design 文档配置", () => {
|
||||
const docs = defaultConfig.stages.plan!.documents;
|
||||
expect(docs).toHaveLength(2);
|
||||
expect(docs).toHaveLength(1);
|
||||
expect(docs[0].name).toBe("design");
|
||||
expect(docs[1].name).toBe("task");
|
||||
for (const doc of docs) {
|
||||
expect(doc.prompt).toBeTruthy();
|
||||
}
|
||||
});
|
||||
|
||||
it("plan 的 task 文档配置存在", () => {
|
||||
const taskDoc = defaultConfig.stages.plan!.documents.find((d) => d.name === "task");
|
||||
expect(taskDoc).toBeDefined();
|
||||
expect(taskDoc!.prompt).toBeTruthy();
|
||||
});
|
||||
|
||||
it("task 文档依赖 design", () => {
|
||||
const taskDoc = defaultConfig.stages.plan!.documents.find((d) => d.name === "task");
|
||||
expect(taskDoc!.depend).toEqual(["design"]);
|
||||
expect(docs[0].prompt).toBeTruthy();
|
||||
});
|
||||
|
||||
it("design 文档有 template", () => {
|
||||
@@ -69,10 +56,9 @@ describe("defaultConfig", () => {
|
||||
expect(designDoc!.template).toContain("设计文档");
|
||||
});
|
||||
|
||||
it("task 文档有 template", () => {
|
||||
const taskDoc = defaultConfig.stages.plan!.documents.find((d) => d.name === "task");
|
||||
expect(taskDoc!.template).toBeTruthy();
|
||||
expect(taskDoc!.template).toContain("- [ ]");
|
||||
it("task 阶段有 prompt", () => {
|
||||
expect(defaultConfig.stages.task).toBeDefined();
|
||||
expect(defaultConfig.stages.task!.prompt).toBeTruthy();
|
||||
});
|
||||
|
||||
it("build 阶段有 prompt", () => {
|
||||
|
||||
Reference in New Issue
Block a user