Files
mosaic/packages/prdy/tests/templates.test.ts
Jason Woltje 3106ca8cf8 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:*
2026-03-06 20:21:39 -06:00

23 lines
835 B
TypeScript

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);
}
}
});
});