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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user