mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 12:40:08 +08:00
b29d5ac75b
Summary: Adding tests Test Plan: Tests Reviewers: juan, bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D2892
14 lines
537 B
JavaScript
14 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")
|