4

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?

George Armhold
  • 30,824
  • 50
  • 153
  • 232
  • I don't have an answer for this specific question, but I upvoted because `knex.destroy()` fixed an issue I was having with gulp hanging. A lot of test frameworks have a before and after method - does NodeUnit not? –  Jul 17 '15 at 15:53

0 Answers0