Skip to content

Commit 4b2661f

Browse files
committed
Update JSON Bind Test Case
1 parent c820413 commit 4b2661f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

test/jsonBind1.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,9 @@ describe('253. jsonBind1.js', function() {
466466
it('253.2.10 INTERVAL YEAR TO MONTH type', async () => {
467467
const sql = `INSERT into ` + tableName + ` VALUES (JSON_OBJECT( key 'key1' value json_scalar(to_yminterval(:b)) RETURNING JSON))`;
468468
if (testsUtil.getClientVersion() >= 2100000000) {
469+
await conn.execute(sql, ['5-9']);
469470
await assert.rejects(
470-
async () => {
471-
await conn.execute(sql, ['5-9']);
472-
await conn.execute(rsSelect);
473-
},
471+
async () => await conn.execute(rsSelect),
474472
/NJS-078/
475473
);//NJS-078: unsupported data type 2016 in JSON value
476474
} else {
@@ -485,11 +483,9 @@ describe('253. jsonBind1.js', function() {
485483
it('253.2.11 INTERVAL DAY TO SECOND type', async function() {
486484
const sql = `INSERT into ` + tableName + ` VALUES (JSON_OBJECT( key 'key1' value json_scalar(to_dsinterval(:b)) RETURNING JSON))`;
487485
if (testsUtil.getClientVersion() >= 2100000000) {
486+
await conn.execute(sql, ['11 10:09:08']);
488487
await assert.rejects(
489-
async () => {
490-
await conn.execute(sql, ['11 10:09:08']);
491-
await conn.execute(rsSelect);
492-
},
488+
async () => await conn.execute(rsSelect),
493489
/NJS-078/
494490
);//NJS-078: unsupported data type 2015 in JSON value
495491
} else {

0 commit comments

Comments
 (0)