Skip to content

Commit a4d821a

Browse files
committed
Add test for helpers in transactions
1 parent 618323f commit a4d821a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ t('Transaction succeeds on uncaught savepoint', async() => {
164164
return [2, (await sql`select count(1) from test`)[0].count]
165165
}, () => sql`drop table test`)
166166

167+
t('Helpers in Transaction', async() => {
168+
return [1, (await sql.begin(async sql =>
169+
await sql`select ${ sql({ x: 1 }) }`
170+
))[0].x]
171+
})
172+
167173
t('Throw syntax error', async() =>
168174
['42601', (await sql`wat 1`.catch(x => x)).code]
169175
)

0 commit comments

Comments
 (0)