Skip to content

Commit c97737a

Browse files
committed
tests: adds another way of making a simple query with object params
1 parent 77a23c1 commit c97737a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/integration/connection/test-query.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ common.getTestConnection(function (err, connection) {
88
assert.ifError(err);
99
assert.deepEqual(rows, [{1: 1}]);
1010
assert.equal(fields[0].name, '1');
11-
connection.end(assert.ifError);
11+
12+
// this is a coverage test, it shuold perform exactly as the previous one
13+
connection.query({ sql: 'SELECT ?' }, [ 1 ], function (err, rows, fields) {
14+
assert.ifError(err);
15+
assert.deepEqual(rows, [{1: 1}]);
16+
assert.equal(fields[0].name, '1');
17+
connection.end(assert.ifError);
18+
});
1219
});
1320
});

0 commit comments

Comments
 (0)