F[I]RST: [I]solate Your Tests
This lesson will teach the importance of isolating tests by using the SRP principle.
Good unit tests
Good unit tests focus on verifying small chunks of code.
The more code that our test interacts with, directly or indirectly, the more things are likely to go awry.
Shared data sources
The code we’re testing might interact with other code that reads from a database. Data dependencies create a whole host of problems.
Tests that ultimately depend on a database require us to ensure that the database has the ...
Database access