tearDown() that is only executed after ALL tests have run?

208 Views Asked by At

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?

0

There are 0 best solutions below