Ensure trigger second output is revaluated for date types

This commit is contained in:
Nick O'Leary
2024-10-21 16:35:11 +01:00
parent b3aff3a3e6
commit 2220956007
2 changed files with 2 additions and 2 deletions

View File

@@ -152,7 +152,7 @@ describe('trigger node', function() {
if (rval) {
msg.should.have.property("payload");
if (type == "date" && val == "0") {
should.deepEqual(Math.round(msg.payload/1000000), parseInt(Date.now()/1000000));
;(Math.round(msg.payload/1000000)).should.be.approximately(parseInt(Date.now()/1000000), 1);
}
else if (type == "date" && val == "iso") {
should.deepEqual(msg.payload.substr(0,11), rval.substr(0,11));