@@ -97,8 +97,9 @@ test('handles falsy values', () => {
9797
9898test ( 'throws detailed error for undefined value' , ( ) => {
9999 try {
100+ // oxlint-disable-next-line no-unassigned-vars
100101 let undefinedVar : any
101- yql `SELECT ${ undefinedVar } ;`
102+ void yql `SELECT ${ undefinedVar } ;`
102103 expect . fail ( 'Should have thrown' )
103104 } catch ( error : any ) {
104105 expect ( error . message ) . toContain ( 'position 0' )
@@ -110,7 +111,7 @@ test('throws detailed error for undefined value', () => {
110111
111112test ( 'throws detailed error for null value' , ( ) => {
112113 try {
113- yql `SELECT ${ 42 } , ${ null } , ${ true } ;`
114+ void yql `SELECT ${ 42 } , ${ null } , ${ true } ;`
114115 expect . fail ( 'Should have thrown' )
115116 } catch ( error : any ) {
116117 expect ( error . message ) . toContain ( 'position 1' ) // null is at position 1
@@ -145,32 +146,32 @@ test('handles mixed unsafe and safe values', () => {
145146} )
146147
147148test ( 'creates identifier unsafe string' , ( ) => {
148- let id = identifier ( 'my_table' )
149+ let id = identifier ( 'my_table' )
149150
150- expect ( id . toString ( ) ) . eq ( '`my_table`' )
151- expect ( id ) . toBeInstanceOf ( String )
151+ expect ( id . toString ( ) ) . eq ( '`my_table`' )
152+ expect ( id ) . toBeInstanceOf ( String )
152153} )
153154
154155test ( 'creates unsafe string' , ( ) => {
155- let raw = unsafe ( 'RAW SQL' )
156+ let raw = unsafe ( 'RAW SQL' )
156157
157- expect ( raw . toString ( ) ) . eq ( 'RAW SQL' )
158- expect ( raw ) . toBeInstanceOf ( String )
158+ expect ( raw . toString ( ) ) . eq ( 'RAW SQL' )
159+ expect ( raw ) . toBeInstanceOf ( String )
159160} )
160161
161162test ( 'identifier escapes backticks inside names' , ( ) => {
162- let id = identifier ( 'my`table' )
163+ let id = identifier ( 'my`table' )
163164
164- expect ( id . toString ( ) ) . eq ( '`my``table`' )
165+ expect ( id . toString ( ) ) . eq ( '`my``table`' )
165166} )
166167
167168test ( 'public exports identifier/unsafe behave correctly' , async ( ) => {
168- // Import from public entry to ensure re-exports work in tests
169- const { identifier : pubIdentifier , unsafe : pubUnsafe } = await import ( './index.ts' )
169+ // Import from public entry to ensure re-exports work in tests
170+ const { identifier : pubIdentifier , unsafe : pubUnsafe } = await import ( './index.ts' )
170171
171- expect ( pubIdentifier ( 'users' ) . toString ( ) ) . eq ( '`users`' )
172- expect ( pubIdentifier ( 'a`b' ) . toString ( ) ) . eq ( '`a``b`' )
173- expect ( pubUnsafe ( 'ORDER BY created_at DESC' ) . toString ( ) ) . eq ( 'ORDER BY created_at DESC' )
172+ expect ( pubIdentifier ( 'users' ) . toString ( ) ) . eq ( '`users`' )
173+ expect ( pubIdentifier ( 'a`b' ) . toString ( ) ) . eq ( '`a``b`' )
174+ expect ( pubUnsafe ( 'ORDER BY created_at DESC' ) . toString ( ) ) . eq ( 'ORDER BY created_at DESC' )
174175} )
175176
176177test ( 'handles various data types' , ( ) => {
@@ -210,7 +211,7 @@ test('handles unsafe values at boundaries', () => {
210211
211212test ( 'validates all parameters and reports first error' , ( ) => {
212213 try {
213- yql `SELECT ${ undefined } , ${ null } ;` // both are invalid
214+ void yql `SELECT ${ undefined } , ${ null } ;` // both are invalid
214215 expect . fail ( 'Should have thrown' )
215216 } catch ( error : any ) {
216217 // Should catch the first error (undefined at position 0)
0 commit comments