From ec3c490058ed2fc514410ce3b410ca7e154c44ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Koskim=C3=A4ki?= Date: Fri, 15 Mar 2019 16:07:33 +0200 Subject: [PATCH] improve reproduction-template --- reproduction-template.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/reproduction-template.js b/reproduction-template.js index aade7a439..a8641a011 100644 --- a/reproduction-template.js +++ b/reproduction-template.js @@ -45,8 +45,6 @@ async function main() { .eager('pets'); chai.expect(jennifer.pets[0].name).to.equal('Doggo'); - - await knex.destroy() } /////////////////////////////////////////////////////////////// @@ -56,7 +54,7 @@ async function main() { const knex = Knex({ client: 'sqlite3', useNullAsDefault: true, - debug: true, + debug: false, connection: { filename: ':memory:' } @@ -266,5 +264,11 @@ async function createSchema() { } main() - .then(() => console.log('success')) - .catch(console.error); + .then(() => { + console.log('success') + return knex.destroy() + }) + .catch(err => { + console.error(err) + return knex.destroy() + });