A spy is a test double that records the calls it receives so the test can assert on them after the fact; unlike a mock, a spy does not fail by itself, it just produces a ledger.
A spy is a test double that records the calls it receives so the test can assert on them after the fact; unlike a mock, a spy does not fail by itself, it just produces a ledger.