Skip to content

Commit

Permalink
Update database.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
gionatamettifogo committed Nov 12, 2023
1 parent 4f3141d commit 92c6a59
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,12 @@ describe('Database', () => {
const results = await database.sql`SELECT * FROM people WHERE name = 'Eva' OR name = ${name} OR age < 30`
expect(results).toHaveLength(11)
})

it('template string with multiple queries', async () => {
for (let i = 0; i < 2; i++) {
const results = await database.sql`SELECT * FROM people ORDER BY RANDOM() LIMIT 12`
expect(results).toHaveLength(12)
}
})
})
})

0 comments on commit 92c6a59

Please sign in to comment.