Test Results
when mock timezone is undefined and timezoneOffset is 360
- ✅ should have correct tz offset: 360
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
when mock timezone is Etc/GMT+12 and timezoneOffset is 720
- ✅ should have correct tz offset: 720
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
when mock timezone is US/Pacific and timezoneOffset is 480
- ✅ should have correct tz offset: 480
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
when mock timezone is US/Eastern and timezoneOffset is 300
- ✅ should have correct tz offset: 300
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
when mock timezone is Brazil/East and timezoneOffset is 120
- ✅ should have correct tz offset: 120
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
when mock timezone is UTC and timezoneOffset is 0
- ✅ should have correct tz offset: 0
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
when mock timezone is Europe/London and timezoneOffset is 0
- ✅ should have correct tz offset: 0
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
when mock timezone is Australia/Adelaide and timezoneOffset is -630
- ✅ should have correct tz offset: -630
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
when mock timezone is Etc/GMT-14 and timezoneOffset is -840
- ✅ should have correct tz offset: -840
new Date().getTime()
- ✅ input: 0, expected: 0
- ✅ input: 1262304000000, expected: 1262304000000
- ✅ input: 1585699199999, expected: 1585699199999
- ✅ input: 2010-01-01, expected: 1262304000000
- ✅ input: 2020-03-31T23:59:59.999Z, expected: 1585699199999
new Date().toISOString()
- ✅ input: 0, expected: "1970-01-01T00:00:00.000Z"
- ✅ input: 1262304000000, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 1585699199999, expected: "2020-03-31T23:59:59.999Z"
- ✅ input: 2010-01-01, expected: "2010-01-01T00:00:00.000Z"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "2020-03-31T23:59:59.999Z"
dateFormat('QQQ yyyy')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Q1 2010"
- ✅ input: 1585699199999, expected: "Q1 2020"
- ✅ input: 2010-01-01, expected: "Q1 2010"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Q1 2020"
dateFormat('PPpp')
- ✅ input: 0, expected: "-"
- ✅ input: 1262304000000, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 1585699199999, expected: "Mar 31, 2020, 11:59:59 PM"
- ✅ input: 2010-01-01, expected: "Jan 1, 2010, 12:00:00 AM"
- ✅ input: 2020-03-31T23:59:59.999Z, expected: "Mar 31, 2020, 11:59:59 PM"
Summary
Tests | # | % |
---|---|---|
Passed | 189 | 100% |
Failed | 0 | 0% |