Skip to content

Commit

Permalink
fix timestamp format in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-coleman authored and mattbaileyuk committed Jan 7, 2019
1 parent 0d7e4d4 commit 68201a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/implementation-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe("Functions with side-effects", () => {

describe("$now() returns timestamp with defined format", function() {
it("should return result object", function() {
var expr = jsonata("$now('[h]:[M][P] [z]')");
var expr = jsonata("$now('[h]:[M01][P] [z]')");
var result = expr.evaluate(testdata2);
// follows this pattern - "10:23am GMT+00:00"
expect(result).to.match(/^\d?\d:\d\d[ap]m GMT\+00:00$/);
Expand All @@ -149,7 +149,7 @@ describe("Functions with side-effects", () => {

describe("$now() returns timestamp with defined format and timezone", function() {
it("should return result object", function() {
var expr = jsonata("$now('[h]:[M][P] [z]', '-0500')");
var expr = jsonata("$now('[h]:[M01][P] [z]', '-0500')");
var result = expr.evaluate(testdata2);
// follows this pattern - "10:23am GMT-05:00"
expect(result).to.match(/^\d?\d:\d\d[ap]m GMT-05:00$/);
Expand Down

0 comments on commit 68201a7

Please sign in to comment.