mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-24 16:14:01 +08:00
fix(specs) Fix date-utils specs
This commit is contained in:
parent
2418c0ef30
commit
69161e8f04
1 changed files with 2 additions and 4 deletions
|
@ -150,24 +150,22 @@ describe('DateUtils', function dateUtils() {
|
|||
describe('fullTimeString: 12-hour time', () => {
|
||||
beforeEach(() => {
|
||||
spyOn(NylasEnv.config, 'get').andReturn(false)
|
||||
self.tz = moment.tz(moment.tz.guess()).zoneAbbr()
|
||||
});
|
||||
|
||||
it('displays a date and time', () => {
|
||||
const datestring = DateUtils.fullTimeString('1982-10-24 22:45')
|
||||
expect(datestring).toBe(`Sunday, October 24th 1982, 10:45:00 PM ${self.tz}`)
|
||||
expect(datestring.startsWith(`Sunday, October 24th 1982, 10:45:00 PM`)).toBe(true)
|
||||
});
|
||||
});
|
||||
|
||||
describe('fullTimeString: 24-hour time', () => {
|
||||
beforeEach(() => {
|
||||
spyOn(NylasEnv.config, 'get').andReturn(true)
|
||||
self.tz = moment.tz(moment.tz.guess()).zoneAbbr()
|
||||
});
|
||||
|
||||
it('displays a date and time', () => {
|
||||
const datestring = DateUtils.fullTimeString('1982-10-24 22:45')
|
||||
expect(datestring).toBe(`Sunday, October 24th 1982, 22:45:00 ${self.tz}`)
|
||||
expect(datestring.startsWith(`Sunday, October 24th 1982, 22:45:00`)).toBe(true)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue