Closed
Description
I would like to have a clean DB for every single unit test.
I'm using more or less the code from your README. However I'm using beforeEach
and afterEach
instead of *All
. I would have expected the database to be clear after closing the connection in one unit test and creating a new one in the next, but apparently this is not the case.
When rerunning the tests, the first test always starts from a "clean" database. How can I achieve this for every test? At the moment, to achieve what I want, I drop the tables in afterEach
, but I'm sure there must be a better approach? You can view me code here.
Metadata
Metadata
Assignees
Labels
No labels