Skip to content

Commit b83c2f6

Browse files
committed
Test escaping
1 parent 155f74d commit b83c2f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ t('Escape in arrays', async() =>
114114
['Hello "you",c:\\windows', (await sql`select ${ sql.array(['Hello "you"', 'c:\\windows']) } as x`)[0].x.join(',')]
115115
)
116116

117+
t('Escapes', async() => {
118+
return ['hej"hej', Object.keys((await sql`select 1 as ${ sql('hej"hej') }`)[0])[0]]
119+
})
120+
117121
t('null for int', async() => {
118122
await sql`create table test (x int)`
119123
return [1, (await sql`insert into test values(${ null })`).count]

0 commit comments

Comments
 (0)