Regression test
A test that ensures something which once worked still does. A regression is therefore not just any bug — it's a defect in behaviour that used to be correct.
The most valuable kind is written in response to a reported bug: write a test that fails, fix the defect, watch it turn green. The test stays forever as protection against that exact recurrence, and the collection grows into a suite that runs in CI on every push. Techniques include snapshot and golden master testing, where output is compared against a stored reference file — powerful but easy to misuse, since it's tempting to update the reference instead of understanding why it changed. Once a regression has slipped in, git bisect is the fastest way to find the commit that caused it.