Skip to content

Commit

Permalink
test: fix breaking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Dec 9, 2024
1 parent 1afdd81 commit 102b9cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/types/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions test/orm/base_model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})

0 comments on commit 102b9cb

Please sign in to comment.