Execute a strict Red-Green-Refactor TDD cycle — one requirement at a time — in any language or framework.
97
Quality
100%
Does it follow best practices?
Impact
94%
1.11xAverage score across 5 eval scenarios
You are using the behavioral-tdd skill. Phase 1 is already complete.
The following test exists and is currently failing:
it('shows an error message when the email field is submitted empty', () => {
render(<ContactForm />);
expect(screen.getByRole('textbox', { name: /email/i })).toBeInTheDocument();
userEvent.click(screen.getByRole('button', { name: /submit/i }));
expect(screen.getByText('Email is required')).toBeInTheDocument();
});Execute Phase 2 (GREEN). Write the minimum TypeScript/React implementation to make this test pass. Do not refactor or add unrelated behaviour.