Comment

Comment by ninetyninenine

Integration.

Unit tests should just test code units. All the external stuff should be mocked or not tested.

The example in the post is a unit test.

It’s good to keep it separate as unit tests are really easy to run and less complicated and much faster. Integration tests are much more complicated and often sort of freeze your code as it locks in the implementation.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton