commit type

test commit template

A commit that adds missing tests, corrects existing tests, or refactors the test suite — no production code changes.

test(scope): short imperative description of what is tested - what scenarios are now covered (bullet 1) - what edge cases were added (bullet 2) - what was corrected in existing tests (bullet 3) Why these tests were needed: missing coverage, regression prevention, or test quality improvement. Max 72 chars/line.
test(auth): add integration tests for refresh token rotation - cover successful rotation: old token revoked, new token issued and usable - cover concurrent rotation: second use of same token returns 401 - cover expired token: returns 401 with token_expired error code - assert HttpOnly and Secure cookie flags on issued tokens Refresh token logic had zero integration coverage; these tests caught a bug where concurrent rotation was not atomic under parallel requests.
test(checkout): add unit tests for discount calculation edge cases - cover percentage discounts that round to sub-cent amounts - cover stacked discounts where order matters for final price - cover maximum discount cap enforcement - parameterise test data to cover all discount type combinations Discount calculations were changed three times without test coverage; parameterised tests ensure regressions are caught without adding new test functions for each scenario.
test(api): migrate integration tests from supertest to httpx - rewrite 34 supertest-based tests using httpx client - preserve all existing assertions with equivalent httpx API calls - add request/response logging fixture for easier failure debugging supertest is unmaintained; httpx provides active maintenance, better TypeScript types, and native async/await without wrapping in promises.
test(parser): add property-based tests for CSV parser with fast-check - generate arbitrary CSV inputs including unicode, quoted commas, and newlines - verify that parse(serialise(data)) round-trips without loss - assert no thrown errors on any valid RFC 4180 input Unit tests only covered hand-crafted examples; property-based tests found two bugs in unicode quote handling that the fixed examples missed.

Use test when adding, updating, or reorganising tests without touching production code. If you fix a bug and add a regression test in the same commit, use fix — the test is part of the fix.

git-agent automatically analyzes your changes and infers the correct commit type.

brew install gitagenthq/tap/git-agent
Should regression tests be committed with fix or test?
With the fix. A regression test and its corresponding fix are logically one unit of work. Splitting them would leave the fix commit without coverage and the test commit without any failing case to reference.
Does test trigger a version bump or appear in changelogs?
No. test commits are excluded from public changelogs and do not trigger version bumps in standard semantic-release or release-please configurations.
Should test infrastructure changes (jest.config.ts, vitest.config.ts) use test or chore?
Either is reasonable. test is appropriate because the change directly affects the test suite. chore is also used when the change is a configuration housekeeping task. Be consistent within your project.