feat(wave3): add @mosaic/prdy — TypeScript PRD wizard
- PRD CRUD: createPrd, loadPrd, savePrd, listPrds - Interactive wizard using @clack/prompts - Built-in templates: software, feature, spike - CLI: prdy init | list | show - Depends on @mosaic/types workspace:*
This commit is contained in:
22
packages/prdy/tests/templates.test.ts
Normal file
22
packages/prdy/tests/templates.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { BUILTIN_PRD_TEMPLATES } from '../src/templates.js';
|
||||
|
||||
describe('built-in PRD templates', () => {
|
||||
it('includes software, feature, and spike templates with required fields', () => {
|
||||
expect(BUILTIN_PRD_TEMPLATES.software).toBeDefined();
|
||||
expect(BUILTIN_PRD_TEMPLATES.feature).toBeDefined();
|
||||
expect(BUILTIN_PRD_TEMPLATES.spike).toBeDefined();
|
||||
|
||||
for (const template of Object.values(BUILTIN_PRD_TEMPLATES)) {
|
||||
expect(template.sections.length).toBeGreaterThan(0);
|
||||
expect(template.fields.length).toBeGreaterThan(0);
|
||||
|
||||
for (const section of template.sections) {
|
||||
expect(section.id.length).toBeGreaterThan(0);
|
||||
expect(section.title.length).toBeGreaterThan(0);
|
||||
expect(section.fields.length).toBeGreaterThan(0);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user