Files
mosaic/packages/prdy/tests/templates.test.ts
2026-03-07 02:21:54 +00: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);
}
}
});
});