Comment

Comment by malux85

Mocks are useful, but their example of mocks being used to increase speed is a bad thing (tm)

I believe your tests need to run as close to real data as possible. This includes making calls to the DB, and making calls to API's.

If you're using mocks to speed up your testing, I think you're attacking the problem in the wrong way. If you're tests are truly isolated and atomic then they can be executed in parallel. Some tests will rely on the results of a previous test, so break the testing into modules and execute the modules in parallel.

Mocks are handy, but should only be used when real data isn't appropriate.

parent malux85 14 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton