Skip to content

Commit

Permalink
test(query_builder): add proper assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainLanz committed Sep 6, 2024
1 parent 6e4b415 commit 3e464c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/database/query_builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5474,18 +5474,18 @@ test.group('Query Builder | orderByRandom', (group) => {
},
])

const users = []
const userResults: number[][] = []

for (let i = 0; i < 10; i++) {
const result = await db.from('users').orderByRandom()

users.push(result.map((user) => user.id))
userResults.push(result.map((user) => user.id))
}

// TODO: Check which assertion is better to use
assert.isTrue(userResults.some((users) => userResults[0] !== users))

await connection.disconnect()
})
}).pin()
})

test.group('Query Builder | offset', (group) => {
Expand Down

0 comments on commit 3e464c7

Please sign in to comment.