Test Mock
Noun · Development
Definitions
A test double that replaces a real dependency with a programmable stand-in, pre-configured to return specific responses and capable of verifying that expected interactions (method calls, arguments, call order) actually occurred during the test.
In plain English: A fake version of a component used in testing that can check whether your code talked to it correctly.
Example: "I mocked the payment gateway so the test verifies we call charge() with the right amount without actually billing anyone."