From e2e9c88d179b37c5a5b75929932dbed5f429fbe1 Mon Sep 17 00:00:00 2001 From: Gary Gurlaskie Date: Mon, 9 Sep 2019 11:34:27 -0400 Subject: [PATCH] fix hanging test code - close connection during after() hook --- listing.model.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/listing.model.test.js b/listing.model.test.js index d8802b7..e81fa43 100644 --- a/listing.model.test.js +++ b/listing.model.test.js @@ -85,4 +85,8 @@ describe('Listing Schema Unit Tests', function() { done(); } }); + + after(function(done) { + mongoose.connection.close(false, done); + }); });