Glossary term
What is spy? Meaning for developers
A wrapper that records calls to a real function while still running it.
Learn it properly · Testing From ZeroLesson 1: Unit Tests and Test DoublesArrange-act-assert, stubs, mocks, spies and fakes, fake timers, async errors, test isolation, and why mocking your own internals hurts.