Race condition with test for date assertion
I have seen jobs fail a few times on this condition.
1) Assert->assert->should assert a date
AssertionError [ERR_ASSERTION]: Date(Fri Feb 14 2020 20:53:28 GMT+0000 (Coordinated Universal Time)) does not equal Date(Fri Feb 14 2020 20:53:28 GMT+0000 (Coordinated Universal Time))
at new AssertionError (internal/assert/assertion_error.js:425:11)
at new AssertionError (/builds/JustFowl/kado/lib/Validate.js:26:5)
at Function.assert (/builds/JustFowl/kado/lib/Validate.js:56:13)
at Function.assert (/builds/JustFowl/kado/lib/Assert.js:26:21)
at Function.<anonymous> (/builds/JustFowl/kado/test/Assert.test.js:65:12)
at /builds/JustFowl/kado/lib/TestRunner.js:384:56
at new Promise (<anonymous>)
at /builds/JustFowl/kado/lib/TestRunner.js:377:16 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: undefined,
expected: undefined,
operator: undefined
}
It is caused because the call structure of the assertion allows the time to shift.
@tony can you please look into this and submit an MR?