There was an error while loading. Please reload this page.
1 parent 69c95d1 commit 2318786Copy full SHA for 2318786
test/StringField_test.js
@@ -466,8 +466,10 @@ describe("StringField", () => {
466
467
return SimulateAsync().click(node.querySelector("a.btn-now"))
468
.then(() => {
469
- const expected = toDateString(parseDateString(new Date().toJSON(), true));
470
- expect(comp.state.formData).eql(expected);
+ // Test that the two DATETIMEs are within 5 seconds of each other.
+ const now = new Date().getTime();
471
+ const timeDiff = now - new Date(comp.state.formData).getTime();
472
+ expect(timeDiff).to.be.at.most(5000);
473
});
474
475
0 commit comments