diff --git a/tests/mocha.ts b/tests/mocha.ts index b3be66d..c6c9884 100644 --- a/tests/mocha.ts +++ b/tests/mocha.ts @@ -1,4 +1,5 @@ import { Knex, knex } from 'knex'; +import { before, after, describe, it } from 'mocha'; import * as assert from "assert"; import { Model } from "objection"; @@ -16,7 +17,7 @@ describe("testPerTransaction", () => { it("can access models during test", async () => { await Item.query().insert({}); const count = await Item.query().count(); - assert.equal(count[0]["count(*)"], 1); + assert.equal((count[0] as any)["count(*)"], 1); }); it("rolls back transaction after tests", async () => { @@ -25,7 +26,7 @@ describe("testPerTransaction", () => { after(async () => { const count = await Item.query().count(); - assert.equal(count[0]["count(*)"], 0); + assert.equal((count[0] as any)["count(*)"], 0); }); }); diff --git a/tsconfig.json b/tsconfig.json index fad2876..569e06a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,15 @@ { "compilerOptions": { "allowJs": false, - "target": "es2017", - "lib": ["es2015", "es6", "es2017", "esnext.asynciterable"], - "module": "commonjs", - "moduleResolution": "node", + "target": "es2023", + "lib": ["es2023"], + "module": "NodeNext", + "moduleResolution": "NodeNext", "declaration": true, "outDir": "./dist", - "strict": false, - "esModuleInterop": true + "strict": true, + "skipLibCheck": true + }, "files": ["index.ts"] }