mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-13 17:52:22 +00:00
fix(webhook tests): more reliable date test
This commit is contained in:
parent
f6484c872a
commit
9dcce382a3
1 changed files with 2 additions and 2 deletions
|
|
@ -414,8 +414,8 @@ describe('webhooks', () => {
|
|||
user = await User.findById(user._id).exec();
|
||||
|
||||
expect(user.webhooks[0].failures).to.equal(1);
|
||||
expect(user.webhooks[0].lastFailureAt.toLocaleString())
|
||||
.to.equal((new Date()).toLocaleString());
|
||||
// Check that the stored date is whitin 10s from now
|
||||
expect((Date.now() - user.webhooks[0].lastFailureAt.getTime()) < 10000).to.be.true;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue