diff --git a/package.json b/package.json index 78582122..47c7613f 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test:psql": "jest --config jest.config.psql.mjs --runInBand", "test:ci:s3": "jest --config jest.config.s3.ci.mjs --runInBand", "test:ci:psql": "npm run test:ci:psql:init && jest --config jest.config.psql.ci.mjs --runInBand", - "test:ci:psql:init": "ts-node test/environment/init-db.ts" + "test:ci:psql:init": "node test/environment/init-db.mjs" }, "repository": { "type": "git", diff --git a/test/environment/init-db.ts b/test/environment/init-db.mjs similarity index 86% rename from test/environment/init-db.ts rename to test/environment/init-db.mjs index dc87eff4..cd166940 100644 --- a/test/environment/init-db.ts +++ b/test/environment/init-db.mjs @@ -1,9 +1,9 @@ import path from 'node:path'; -import knex, { type Knex } from 'knex'; +import knex from 'knex'; -void (async (): Promise => { - let connection: Knex | undefined; +void (async () => { + let connection; try { connection = knex({ client: 'pg', @@ -25,7 +25,7 @@ void (async (): Promise => { await connection('users').insert({ c2c_id: 1 }); await connection('users').insert({ c2c_id: 2 }); console.log('DB initialized 🚀'); - } catch (error: unknown) { + } catch (error) { console.error(error); } finally { await connection?.destroy(); diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index f00b42ce..2c82d68e 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -4,6 +4,6 @@ "rootDir": ".", "outDir": "./dist" }, - "include": ["src/**/*.ts", "test/**/*.ts", "test/**/*.js", "jest.config.*"], + "include": ["src/**/*.ts", "test/**/*.ts"], "exclude": ["node_modules"] }