Skip to content

Commit f52e99e

Browse files
author
Chaoran Yang
committed
Fix test-SqlString to include the milliseconds for Date objects.
1 parent a1cbf33 commit f52e99e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit/protocol/test-SqlString.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ test('SqlString.escape', {
8585
assert.equal(SqlString.escape('Sup"er'), "'Sup\\\"er'");
8686
},
8787

88-
'dates are converted to YYYY-MM-DD HH:II:SS': function() {
89-
var expected = '2012-05-07 11:42:03';
90-
var date = new Date(Date.UTC(2012, 4, 7, 11, 42, 3));
88+
'dates are converted to YYYY-MM-DD HH:II:SS.sss': function() {
89+
var expected = '2012-05-07 11:42:03.002';
90+
var date = new Date(Date.UTC(2012, 4, 7, 11, 42, 3, 2));
9191
var string = SqlString.escape(date);
9292

9393
assert.strictEqual(string, "'" + expected + "'");

0 commit comments

Comments
 (0)