We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d76bda commit 9285875Copy full SHA for 9285875
tests/index.js
@@ -503,3 +503,19 @@ t('Multiple queries', async() => {
503
sql`select 4`
504
])).length]
505
})
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