@@ -131,16 +131,16 @@ t('Json transform nested parameter keys', async() => {
131131 return [ '2' , x ]
132132} )
133133
134- t ( 'Json transform result keys ' , async ( ) => {
134+ t ( 'Json transform typed json parameters ' , async ( ) => {
135135 const sql = postgres ( {
136136 ...options ,
137137 transform : postgres . camel
138138 } )
139- const x = ( await sql `select '{"a_test":1}'::jsonb as x` ) [ 0 ] . x
140- return [ 1 , x . aTest ]
139+ const x = ( await sql `select ${ sql . typed ( { aTest : 1 } , 114 ) } ->>'a_test' as x` ) [ 0 ] . x
140+ return [ '1' , x ]
141141} )
142142
143- t ( 'Json transform implicit json parameters' , async ( ) => {
143+ t ( 'Json transform implicit jsonb parameters' , async ( ) => {
144144 const sql = postgres ( {
145145 ...options ,
146146 transform : postgres . camel
@@ -149,7 +149,7 @@ t('Json transform implicit json parameters', async() => {
149149 return [ '1' , x ]
150150} )
151151
152- t ( 'Json transform implicit json type parameters' , async ( ) => {
152+ t ( 'Json transform implicit json parameters' , async ( ) => {
153153 const sql = postgres ( {
154154 ...options ,
155155 transform : postgres . camel
@@ -158,16 +158,16 @@ t('Json transform implicit json type parameters', async() => {
158158 return [ '1' , x ]
159159} )
160160
161- t ( 'Json transform typed json parameters ' , async ( ) => {
161+ t ( 'Json transform result keys ' , async ( ) => {
162162 const sql = postgres ( {
163163 ...options ,
164164 transform : postgres . camel
165165 } )
166- const x = ( await sql `select ${ sql . typed ( { aTest : 1 } , 114 ) } ->>'a_test' as x` ) [ 0 ] . x
167- return [ '1' , x ]
166+ const x = ( await sql `select '{"a_test":1}'::jsonb as x` ) [ 0 ] . x
167+ return [ 1 , x . aTest ]
168168} )
169169
170- t ( 'Json transform toJSON parameter values' , async ( ) => {
170+ t ( 'Json transform does not transform parameter values with .toJSON() ' , async ( ) => {
171171 const now = new Date ( )
172172 const sql = postgres ( {
173173 ...options ,
0 commit comments