Skip to content

Commit 76367f4

Browse files
author
Bimal Jha
committed
test: add test case for issue #996
1 parent afec1bc commit 76367f4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/test-asyc-await.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ async function test3()
6060
await conn.query("drop table mytab");
6161
await conn.query("create table mytab(c1 int, c2 varchar(10))");
6262
await conn.query("insert into mytab values (?, ?)", [1050, 'rocket']);
63-
//Test for issue #960
63+
64+
// Test for issue #960
6465
let stmt = await conn.prepare(query)
6566
let result = await stmt.executeNonQuery(['canceled', 1050])
6667
console.log("No of updated row = ", result)
@@ -73,6 +74,16 @@ async function test3()
7374
assert.equal(data[0].C2, 'canceled');
7475
await result.close();
7576
await stmt.close();
77+
console.log("Test for issue #960 is done.");
78+
// Test for issue #996
79+
try {
80+
await conn.query("insert into mytab values (?, ?)", [[1050, 'rocket']]);
81+
} catch (err) { console.log("Got error, throwing it."); throw err; }
82+
data = await conn.query("select * from mytab");
83+
console.log("data = ", data);
84+
console.log("Test for issue #996 is done.");
85+
86+
// Clean up
7687
await conn.query("drop table mytab");
7788
await conn.close();
7889
} catch(e) {

0 commit comments

Comments
 (0)