From 2fac6e7aba3b9a5e86e56e30a6802fc0406d0cd6 Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 25 Feb 2022 14:24:43 +0000 Subject: [PATCH] Add sessions table to cleanDb in test data --- utility/db/dbTestData.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utility/db/dbTestData.js b/utility/db/dbTestData.js index c89e576..c925010 100644 --- a/utility/db/dbTestData.js +++ b/utility/db/dbTestData.js @@ -485,7 +485,10 @@ const data = { async function cleanDb(dbConnectionPool) { // Remove records from tables in reverse order to which they depend on // each other - for (const table of Object.keys(data).reverse()) + const tables = Object.keys(data).reverse(); + tables.push('sessions'); + + for (const table of tables) await dbConnectionPool.runQuery(`DELETE FROM ${table};`); }