test double (mock, stub, fake)
noun
- A stand-in for a real dependency in tests: stubs return canned answers, mocks verify calls, fakes are lightweight working versions. An in-memory fake repository lets the test suite run in seconds without a database.
In plain words
- fake the API in tests
- pretend database for testing
- tests call the real payment service
See also dependency injection pure function