From 3acf783d948ebb1907da875ef87b0da9ef2309ff Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 1 Jan 2023 23:23:57 +0100 Subject: Began adding tests --- database/db.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'database') diff --git a/database/db.js b/database/db.js index a360e9b..1e8b50d 100644 --- a/database/db.js +++ b/database/db.js @@ -6,7 +6,10 @@ const allMigrations = [ "database/001_games.sql", ]; -const db = new Database("jdm.db"); +const db = new Database( + process.env.NODE_ENV === "test" ? "testjdm.db" : "jdm.db", + process.env.NODE_ENV === "development" ? { verbose: console.log } : null +); db.pragma("foreign_keys = ON"); db.transaction(function migrate() { -- cgit v1.2.3