web/satellite: Fixed usage tests. (#2963)

This commit is contained in:
Bogdan Artemenko 2019-09-05 16:10:46 +03:00 committed by GitHub
parent 4bcaa59122
commit 15e52e0985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,12 +110,10 @@ describe('actions', () => {
Promise.resolve(testUsage)
);
const firstDate = new Date();
firstDate.setMonth(firstDate.getMonth() - 1);
firstDate.setDate(1);
const date = new Date();
const secondDate = new Date();
secondDate.setDate(1);
const firstDate = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() - 1, 1));
const secondDate = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 0, 23, 59, 59));
await store.dispatch(PROJECT_USAGE_ACTIONS.FETCH_PREVIOUS_ROLLUP);