Skip to content

Commit 9285875

Browse files
committed
Add a few more tests
1 parent 1d76bda commit 9285875

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/index.js

+16
Original file line numberDiff line numberDiff line change
@@ -503,3 +503,19 @@ t('Multiple queries', async() => {
503503
sql`select 4`
504504
])).length]
505505
})
506+
507+
t('Multiple statements', async() =>
508+
[2, await sql.unsafe(`
509+
select 1 as x;
510+
select 2 as x;
511+
`, { simple: true }).then(([, x]) => x.x)]
512+
)
513+
514+
t('throws correct error when authentication fails', async() => {
515+
const sql = postgres({
516+
...options,
517+
...login_md5,
518+
pass: 'wrong'
519+
})
520+
return ['28P01', await sql`select 1`.catch(e => e.code)]
521+
})

0 commit comments

Comments
 (0)