1
1
mirror of https://github.com/leon-ai/leon.git synced 2025-01-02 05:31:38 +03:00
leon/test/unit/server/helpers/date.spec.js

18 lines
442 B
JavaScript
Raw Normal View History

2019-02-10 15:26:50 +03:00
import moment from 'moment-timezone'
import { getDateTime, getTimeZone } from '@/helpers/date'
2019-02-10 15:26:50 +03:00
describe('date helper', () => {
describe('dateTime()', () => {
test('returns date time with UTC', () => {
expect(getDateTime()).toBe(moment().tz(global.date.time_zone).format())
2019-02-10 15:26:50 +03:00
})
})
describe('timeZone()', () => {
test('returns time zone', () => {
expect(getTimeZone()).toBe(global.date.time_zone)
2019-02-10 15:26:50 +03:00
})
})
})