All challengesCHALLENGE 13 OF 25

Add Regression Testing for Bug Fixes

Require regression coverage when fixing bugs.

Intermediate

Goal

Ensure bug fixes include regression coverage that proves the original problem does not return.

Repository Context

This TypeScript application uses Vitest.

Code exampleMarkdown
payments/
├── src/
├── tests/
├── package.json
└── AGENTS.md

The repository expects bug fixes to include a regression test when the behavior can reasonably be tested.

The regression test should reproduce the previously incorrect behavior and pass after the fix.

Current AGENTS.md

Code exampleMarkdown
# Project Instructions

## Development

- Use `pnpm`.
- Keep changes focused on the reported problem.

## Testing

- Run existing tests after fixing a bug.

## Validation

Before completing substantial changes, run:

- `pnpm lint`
- `pnpm typecheck`
- `pnpm test`

Your Task

Add testing guidance requiring a regression test for bug fixes when the affected behavior can reasonably be tested.

Keep the existing validation workflow.

YOUR AGENTS.mdEdit the Current AGENTS.md shown in the challenge
AGENTS.mdMarkdown
Loading editor…

Sign in to save progress across devices.

Your answer is checked locally against the challenge rules. No AI is used for evaluation.