To ensure that tests are free of side effects and independent, we can empty the database before each test.
Example
Edit the /src/api-test.ts
file. The onBefore
method will be executed before each test run.
In this method, we can empty the database before each test starts.