Comment

Comment by stuhacking

Testing a DB connection sounds more like integration than unit testing.

Mocks are used to fake things that add significant overhead but no value. If you have a suite of 1000 unit tests, you really don't want half of them making actual database requests.

Simply making 'safe copies' of the database data does not solve the problem that Mocks are intended to solve.

parent stuhacking 15 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton