Skip to content

Commit

Permalink
Fix raw code test hanging on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
penberg committed Oct 18, 2023
1 parent e95fc23 commit c370d6a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/__tests__/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,11 @@ describe("transaction()", () => {

(hasHrana2 ? test : test.skip)('raw error codes', async () => {
const c = createClient(config)
await expect(c.execute('NOT A VALID SQL')).rejects.toThrow(
expect.toBeLibsqlError({ code: 'SQLITE_ERROR', rawCode: 1})
)
try {
await expect(c.execute('NOT A VALID SQL')).rejects.toThrow(
expect.toBeLibsqlError({ code: 'SQLITE_ERROR', rawCode: 1})
)
} finally {
c.close();
}
})

0 comments on commit c370d6a

Please sign in to comment.