Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 99cad60

Browse filesBrowse files
committed
Missing test for previous patch
1 parent a107dc6 commit 99cad60
Copy full SHA for 99cad60

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎test/simple/test-query.js

Copy file name to clipboardExpand all lines: test/simple/test-query.js
+7-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.