Comment

Comment by ZeroGravitas

Several other people are complaining about 100% coverage sometimes being misleading. One way to test your test is to randomly modify your code e.g. swapping a greater than for a less than. If your tests still pass, then they obviously missed this change in behaviour.

This is known as mutation testing.

https://en.wikipedia.org/wiki/Mutation_testing

I've tried it a few times, I generally found it too slow to be an everyday part of my routine, but interesting tool to have in your belt for e.g. evaluating test in a codebase you didn't write yourself.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton