Skip to content

Database cleaning in jest

Alex Leeson-Mill edited this page Jan 19, 2021 · 1 revision

We had an issue with async functions resulting in the database not dropping in time before the next test was run. This resulted in a different expected result.

We needed to use 'resolve' in the test, to ensure that it's being resolved inside the test before moving on.

Here's an article which gave us some help: resolve

Clone this wiki locally