mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-19 10:14:11 +00:00
refactor(test): less clunky timestamp conv
This commit is contained in:
parent
3c4c64b023
commit
d40c923e6e
1 changed files with 4 additions and 4 deletions
|
|
@ -71,8 +71,8 @@ describe('cron', () => {
|
|||
expect(user.purchased.plan.gemsBought).to.equal(0);
|
||||
});
|
||||
|
||||
it('does not reset plans.gemsBought within the month', () => {
|
||||
let clock = sinon.useFakeTimers(Number(moment().startOf('month').add(2, 'days').toDate()));
|
||||
it('does not reset plan.gemsBought within the month', () => {
|
||||
let clock = sinon.useFakeTimers(moment().startOf('month').add(2, 'days').unix());
|
||||
user.purchased.plan.dateUpdated = moment().startOf('month').toDate();
|
||||
|
||||
user.purchased.plan.gemsBought = 10;
|
||||
|
|
@ -184,8 +184,8 @@ describe('cron', () => {
|
|||
expect(user.purchased.plan.gemsBought).to.equal(0);
|
||||
});
|
||||
|
||||
it('does not reset plans.gemsBought within the month', () => {
|
||||
let clock = sinon.useFakeTimers(Number(moment().startOf('month').add(2, 'days').toDate()));
|
||||
it('does not reset plan.gemsBought within the month', () => {
|
||||
let clock = sinon.useFakeTimers(moment().startOf('month').add(2, 'days').unix());
|
||||
user.purchased.plan.dateUpdated = moment().startOf('month').toDate();
|
||||
|
||||
user.purchased.plan.gemsBought = 10;
|
||||
|
|
|
|||
Loading…
Reference in a new issue