mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
ci: Expand ESLint to tests in BE packages (no-changelog) (#6147)
* 🔧 Adjust base ESLint config * 🔧 Adjust `lint` and `lintfix` in `nodes-base` * 🔧 Include `test` and `utils` in `nodes-base` * 📘 Convert JS tests to TS * 👕 Apply lintfixes
This commit is contained in:
@@ -12,14 +12,14 @@ export default async () => {
|
||||
|
||||
const query =
|
||||
dbType === 'postgres' ? 'SELECT datname as "Database" FROM pg_database' : 'SHOW DATABASES';
|
||||
const results: { Database: string }[] = await connection.query(query);
|
||||
const results: Array<{ Database: string }> = await connection.query(query);
|
||||
const databases = results
|
||||
.filter(
|
||||
({ Database: dbName }) => dbName.startsWith(`${dbType}_`) && dbName.endsWith('_n8n_test'),
|
||||
)
|
||||
.map(({ Database: dbName }) => dbName);
|
||||
|
||||
const promises = databases.map((dbName) => connection.query(`DROP DATABASE ${dbName};`));
|
||||
const promises = databases.map(async (dbName) => connection.query(`DROP DATABASE ${dbName};`));
|
||||
await Promise.all(promises);
|
||||
await connection.destroy();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user