1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-25 17:54:43 +03:00
leon/test/unit/server/helpers/date.spec.js
2022-09-26 21:13:33 +08:00

20 lines
473 B
JavaScript

import moment from 'moment-timezone'
import { DateHelper } from '@/helpers/date-helper'
describe('date helper', () => {
describe('dateTime()', () => {
test('returns date time with UTC', () => {
expect(DateHelper.getDateTime()).toBe(
moment().tz(global.date.time_zone).format()
)
})
})
describe('timeZone()', () => {
test('returns time zone', () => {
expect(DateHelper.getTimeZone()).toBe(global.date.time_zone)
})
})
})