2019-02-10 15:26:50 +03:00
|
|
|
import moment from 'moment-timezone'
|
|
|
|
|
2022-09-12 05:41:16 +03:00
|
|
|
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', () => {
|
2022-09-12 05:41:16 +03:00
|
|
|
expect(getDateTime()).toBe(moment().tz(global.date.time_zone).format())
|
2019-02-10 15:26:50 +03:00
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('timeZone()', () => {
|
|
|
|
test('returns time zone', () => {
|
2022-09-12 05:41:16 +03:00
|
|
|
expect(getTimeZone()).toBe(global.date.time_zone)
|
2019-02-10 15:26:50 +03:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|