From 102b9cb5b7e025baaf76b10321e61affc56e5feb Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Mon, 9 Dec 2024 12:28:00 +0530 Subject: [PATCH] test: fix breaking tests --- src/types/model.ts | 3 +-- test/orm/base_model.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/types/model.ts b/src/types/model.ts index a191d37f..0b41283f 100644 --- a/src/types/model.ts +++ b/src/types/model.ts @@ -10,11 +10,10 @@ import { DateTime } from 'luxon' import type Hooks from '@poppinss/hooks' import { + TransactionFn, DialectContract, - IsolationLevels, QueryClientContract, TransactionClientContract, - TransactionFn, } from './database.js' import { diff --git a/test/orm/base_model.spec.ts b/test/orm/base_model.spec.ts index 9668da8c..3216fc53 100644 --- a/test/orm/base_model.spec.ts +++ b/test/orm/base_model.spec.ts @@ -8366,10 +8366,10 @@ test.group('Base Model | transaction', (group) => { declare email: string } - const [userId] = await User.transaction(async (trx) => { + await User.transaction(async (trx) => { return trx.insertQuery().table('users').insert({ username: 'virk' }).returning('id') }) - const user = await User.find(userId) + const user = await User.find(1) assert.equal(user!.username, 'virk') }) })