Reputation: 31074
I'm trying to write some integration tests in NodeUnit. My tests work fine, but the test runner hangs because knex is keeping a PostgreSQL DB connection open.
I can get it to release by calling knex.destroy()
in my tearDown
, but unfortunately then the DB is no longer available for the rest of my test suite (and tests in other files as well).
Is there a way to implement a tearDown
that runs only once, after ALL tests have run?
Upvotes: 4
Views: 215