Skip to content

Commit 99cad60

Browse files
committed
Missing test for previous patch
1 parent a107dc6 commit 99cad60

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/simple/test-query.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ test(function _handlePacket() {
117117
r = row.my_field;
118118
});
119119

120-
fn(new Buffer(strValue), 0);
120+
var val = (strValue === null)
121+
? null
122+
: new Buffer(strValue);
123+
124+
fn(val, 0);
121125
});
122126

123127
query._handlePacket(PACKET);
@@ -142,4 +146,6 @@ test(function _handlePacket() {
142146
assert.strictEqual(typeCast(Query.FIELD_TYPE_FLOAT, '2.8'), 2.8);
143147
assert.strictEqual(typeCast(Query.FIELD_TYPE_DOUBLE, '2.8'), 2.8);
144148
assert.strictEqual(typeCast(Query.FIELD_TYPE_NEWDECIMAL, '2.8'), 2.8);
149+
150+
assert.strictEqual(typeCast(Query.FIELD_TYPE_DATE, null), null);
145151
});

0 commit comments

Comments
 (0)