Skip to content

Commit 690f730

Browse files
committed
Move negative test up
1 parent e3059aa commit 690f730

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

cjs/tests/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ t('Json transform parameter keys', async() => {
115115
return ['1', x]
116116
})
117117

118+
t('Json without transform keeps parameter keys', async() => {
119+
const x = (await sql`select ${ sql.json({ aTest: 1 }) }->>'aTest' as x`)[0].x
120+
return ['1', x]
121+
})
122+
118123
t('Json transform nested parameter keys', async() => {
119124
const sql = postgres({
120125
...options,
@@ -135,11 +140,6 @@ t('Json transform result keys', async() => {
135140
return [1, x.aTest]
136141
})
137142

138-
t('Json without transform keeps parameter keys', async() => {
139-
const x = (await sql`select ${ sql.json({ aTest: 1 }) }->>'aTest' as x`)[0].x
140-
return ['1', x]
141-
})
142-
143143
t('Json transform implicit json parameters', async() => {
144144
const sql = postgres({
145145
...options,

deno/tests/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ t('Json transform parameter keys', async() => {
117117
return ['1', x]
118118
})
119119

120+
t('Json without transform keeps parameter keys', async() => {
121+
const x = (await sql`select ${ sql.json({ aTest: 1 }) }->>'aTest' as x`)[0].x
122+
return ['1', x]
123+
})
124+
120125
t('Json transform nested parameter keys', async() => {
121126
const sql = postgres({
122127
...options,
@@ -137,11 +142,6 @@ t('Json transform result keys', async() => {
137142
return [1, x.aTest]
138143
})
139144

140-
t('Json without transform keeps parameter keys', async() => {
141-
const x = (await sql`select ${ sql.json({ aTest: 1 }) }->>'aTest' as x`)[0].x
142-
return ['1', x]
143-
})
144-
145145
t('Json transform implicit json parameters', async() => {
146146
const sql = postgres({
147147
...options,

tests/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ t('Json transform parameter keys', async() => {
115115
return ['1', x]
116116
})
117117

118+
t('Json without transform keeps parameter keys', async() => {
119+
const x = (await sql`select ${ sql.json({ aTest: 1 }) }->>'aTest' as x`)[0].x
120+
return ['1', x]
121+
})
122+
118123
t('Json transform nested parameter keys', async() => {
119124
const sql = postgres({
120125
...options,
@@ -135,11 +140,6 @@ t('Json transform result keys', async() => {
135140
return [1, x.aTest]
136141
})
137142

138-
t('Json without transform keeps parameter keys', async() => {
139-
const x = (await sql`select ${ sql.json({ aTest: 1 }) }->>'aTest' as x`)[0].x
140-
return ['1', x]
141-
})
142-
143143
t('Json transform implicit json parameters', async() => {
144144
const sql = postgres({
145145
...options,

0 commit comments

Comments
 (0)