mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
Fixed tests not working in timezones other than UTC
This commit is contained in:
parent
51e3b0ac11
commit
9c90379892
@ -41,10 +41,10 @@ describe('MembersStatsService', function () {
|
||||
let db;
|
||||
|
||||
before(function () {
|
||||
todayDate = moment(today).toDate();
|
||||
tomorrowDate = moment(tomorrow).toDate();
|
||||
yesterdayDate = moment(yesterday).toDate();
|
||||
dayBeforeYesterdayDate = moment(dayBeforeYesterday).toDate();
|
||||
todayDate = moment.utc(today).toDate();
|
||||
tomorrowDate = moment.utc(tomorrow).toDate();
|
||||
yesterdayDate = moment.utc(yesterday).toDate();
|
||||
dayBeforeYesterdayDate = moment.utc(dayBeforeYesterday).toDate();
|
||||
sinon.useFakeTimers(todayDate.getTime());
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user