Skip to content

Commit af4fccd

Browse files
fix timestamp format in unit tests
1 parent b82d167 commit af4fccd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/implementation-tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ describe("Functions with side-effects", () => {
140140

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

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

0 commit comments

Comments
 (0)