Search⌘ K
AI Features

Getting Tests to Clear the DB

Understand how to maintain a clean database state between integration test runs in your React application. This lesson teaches you to create and use scripts to reset the database, preventing test failures caused by data pollution and ensuring accurate test results. You'll learn practical steps for both macOS/Linux and Windows environments to automate this process and ensure consistent integration testing.

We'll cover the following...

We are almost done fixing the integration test for the persistence feature. As you recall, we:

  1. Wrote an integration test that verifies that tasks persist between sessions
  2. Wrote unit tests
...