Mocks

Mocks are often confused with stubs. Martin Fowler once wrote the following in an article titled Mocks Aren't Stubs:

"In particular, I see them (mocks) often confused with stubs - a common helper to testing environments. I understand this confusion - I saw them as similar for a while too, but conversations with the mock developers have steadily allowed a little mock understanding to penetrate my tortoiseshell cranium. This difference is actually two separate differences. On the one hand, there is a difference in how test results are verified: a distinction between state verification and behavior verification. On the other hand, is a whole different philosophy to the way testing and design play together, which I term here as the classical ...

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.