Mailspring/spec/components/nylas-calendar/test-utils.es6
Evan Morikawa b29d5ac75b tests(calendar): adding calendar and scheduler tests
Summary: Adding tests

Test Plan: Tests

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2892
2016-04-19 11:54:15 -07:00

15 lines
537 B
JavaScript

import moment from 'moment-timezone'
export const TZ = window.TEST_TIME_ZONE;
export const TEST_CALENDAR = "TEST_CALENDAR";
export const now = () => window.testNowMoment();
export const NOW_WEEK_START = moment.tz("2016-03-13 00:00", TZ);
export const NOW_BUFFER_START = moment.tz("2016-03-06 00:00", TZ);
export const NOW_BUFFER_END = moment.tz("2016-03-26 23:59:59", TZ);
// Makes test failure output easier to read.
export const u2h = (unixTime) => moment.unix(unixTime).format("LLL z")
export const m2h = (m) => m.format("LLL z")