Started by adding some system tests for the api.
This commit is contained in:
11
seasoned_api/test/helpers/resetDatabase.js
Normal file
11
seasoned_api/test/helpers/resetDatabase.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const SqliteDatabase = require('src/database/sqliteDatabase');
|
||||
|
||||
function resetDatabase() {
|
||||
const database = new SqliteDatabase(':memory:');
|
||||
return Promise.resolve()
|
||||
.then(() => database.connect())
|
||||
.then(() => database.tearDown())
|
||||
.then(() => database.setUp());
|
||||
}
|
||||
|
||||
module.exports = resetDatabase;
|
||||
Reference in New Issue
Block a user