1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-02 03:39:28 +00:00

Lint cleanup with new rules

This commit is contained in:
2022-03-03 09:14:09 +00:00
parent 80291efc6d
commit c9e826d016
20 changed files with 104 additions and 57 deletions

View File

@@ -19,12 +19,15 @@ const { data } = require('./testData');
async function cleanDb() {
const conn = await new DatabaseConnectionPool();
// Remove records from tables in reverse order to which they depend on
// each other
/*
* Remove records from tables in reverse order to which they depend on
* each other
*/
const tables = Object.keys(data).reverse();
tables.push('sessions');
for (const table of tables)
/* eslint-disable-next-line no-await-in-loop */
await conn.runQuery(`DELETE FROM ${table};`);
conn.close();