Files
ehoandClaude Opus 4.8 deb5d77e04
CI / frontend (push) Successful in 3m11s
CI / backend (push) Successful in 2m27s
CI / storybook-a11y (push) Successful in 9m28s
CI / e2e (push) Successful in 4m38s
CI / semgrep (push) Successful in 1m20s
CI / api-client-drift (push) Successful in 2m13s
feat(dx): WP-43 — plop generators (value-object, form-machine)
Runnable `npm run gen:value-object` / `gen:form-machine` (plop) that scaffold the two
pure-TS house patterns with a co-located spec: a branded value object + parseX (mirrors
postcode/bsn), and an Elm-style form/wizard machine (Draft/Valid/Errors + Editing/
Submitting/Submitted/Failed union + initial/pure reduce/assertNever). Prompts take
context + PascalCase name (positional-arg bypass); a post-action reminds to add the
English target for the generated $localize id. Templates in plop-templates/ (prettier-
ignored). Skills (value-object, form-machine) point at the generators. ui-component +
bff-endpoint stay skill-driven (Angular {{}} / backend + gen:api).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 18:04:54 +02:00

14 lines
434 B
Handlebars

import { describe, it, expect } from 'vitest';
import { parse{{pascalCase name}} } from './{{kebabCase name}}';
describe('parse{{pascalCase name}}', () => {
it('accepts a valid value', () => {
// TODO: use a real valid example for {{pascalCase name}}.
expect(parse{{pascalCase name}}('geldig').ok).toBe(true);
});
it('rejects an empty value', () => {
expect(parse{{pascalCase name}}('').ok).toBe(false);
});
});