Skip to content

Commit

Permalink
Remove timezone ('Z') from test data
Browse files Browse the repository at this point in the history
Addresses change in date handling in Node.js version 8.
Fixes #475
  • Loading branch information
wooldridge committed Dec 5, 2017
1 parent 8966495 commit 0f74447
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test-basic/data/echoModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ case 8:
4.4;
break;
case 9:
new Date('2010-10-08T10:17:15.125Z');
new Date('2010-10-08T10:17:15.125');
break;
case 10:
xdmp.arrayValues([1, 'two', {i:3}, [4,'four'], xdmp.unquote('<i>5</i>')]);
Expand Down
10 changes: 5 additions & 5 deletions test-basic/server-exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ describe('server-side call', function() {
.catch(done);
});
it('should generate a date value', function(done) {
db.eval('new Date("2010-10-08T10:17:15.125Z");').result(function(values) {
db.eval('new Date("2010-10-08T10:17:15.125");').result(function(values) {
values.length.should.equal(1);
checkValue(values[0], 'text', 'dateTime');
values[0].value.should.eql(new Date('2010-10-08T10:17:15.125Z'));
values[0].value.should.eql(new Date('2010-10-08T10:17:15.125'));
done();
})
.catch(done);
Expand Down Expand Up @@ -170,7 +170,7 @@ describe('server-side call', function() {
.catch(done);
});
it('should generate values of different types', function(done) {
db.xqueryEval('("string value", fn:true(), 3, 4.4, xs:dateTime("2010-10-08T10:17:15.125Z"))')
db.xqueryEval('("string value", fn:true(), 3, 4.4, xs:dateTime("2010-10-08T10:17:15.125"))')
.result(function(values) {
values.length.should.equal(5);
checkValue(values[0], 'text', 'string');
Expand All @@ -183,7 +183,7 @@ describe('server-side call', function() {
values[3].value.should.equal(4.4);
checkValue(values[4], 'text', 'dateTime');
valcheck.isDate(values[4].value).should.equal(true);
values[4].value.should.eql(new Date('2010-10-08T10:17:15.125Z'));
values[4].value.should.eql(new Date('2010-10-08T10:17:15.125'));
done();
})
.catch(done);
Expand Down Expand Up @@ -340,7 +340,7 @@ describe('server-side call', function() {
db.invoke(invokePath, {test:9}).result(function(values) {
values.length.should.equal(1);
checkValue(values[0], 'text', 'dateTime');
values[0].value.should.eql(new Date('2010-10-08T10:17:15.125Z'));
values[0].value.should.eql(new Date('2010-10-08T10:17:15.125'));
done();
})
.catch(done);
Expand Down

0 comments on commit 0f74447

Please sign in to comment.