I am trying to write some integration tests in NodeUnit. My tests work fine, but the test runner freezes because knex supports opening a PostgreSQL DB connection.
I can make him free by calling knex.destroy()in mine tearDown, but, unfortunately, then the database is no longer available for the rest of my test suite (and tests in other files).
Is there a way to implement tearDownthat runs only once after all tests have been completed?
source
share