Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Besson committed Apr 11, 2023
1 parent 59a52f5 commit 67aef91
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions test/environment/init-db.ts → test/environment/init-db.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import path from 'node:path';

import knex, { type Knex } from 'knex';
import knex from 'knex';

void (async (): Promise<void> => {
let connection: Knex | undefined;
void (async () => {
let connection;
try {
connection = knex({
client: 'pg',
Expand All @@ -25,7 +25,7 @@ void (async (): Promise<void> => {
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();
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"rootDir": ".",
"outDir": "./dist"
},
"include": ["src/**/*.ts", "test/**/*.ts", "test/**/*.js", "jest.config.*"],
"include": ["src/**/*.ts", "test/**/*.ts"],
"exclude": ["node_modules"]
}

0 comments on commit 67aef91

Please sign in to comment.