3 ms·
Yes, there's a pretty fundamental problem: does your mock match the behavior of the real component? You can never be sure, unless you write extensive tests that
by chihuahua 6y ago
Yes, there's a pretty fundamental problem: does your mock match the behavior of the real component? You can never be sure, unless you write extensive tests that compare your mock to the real component. And then those tests need the real component.
But mocks could be useful for testing that your code correctly handles errors that are returned by an external component.