Tried to re-add teardown and updated it to drop only tables that are in the database. Crossing fingers for a second pass.

This commit is contained in:
2017-12-21 00:46:52 +01:00
parent 908fca6dd0
commit 2623649c5d
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,3 @@
DROP TABLE IF EXISTS user;
DROP TABLE IF EXISTS search_history;
DROP TABLE IF EXISTS list;
DROP TABLE IF EXISTS list_content;
DROP TABLE IF EXISTS requests;

View File

@@ -3,7 +3,8 @@ const SqliteDatabase = require('src/database/sqliteDatabase');
function resetDatabase() {
const database = new SqliteDatabase(':memory:');
return Promise.resolve()
.then(() => database.connect())
.then(() => database.connect());
.then(() => database.tearDown());
.then(() => database.setUp());
}