fix(time): test ci error

This commit is contained in:
07akioni 2021-09-09 02:47:59 +08:00
parent 5537d59f92
commit 19ea7b3153

View File

@ -38,7 +38,9 @@ describe('n-time', () => {
it('should work with `type` prop', async () => {
Date.now = () => mockedNow
const wrapper = mount(NTime, { props: { time: date, type: 'date' } })
const wrapper = mount(NTime, {
props: { time: date, type: 'date', timezone: 'Asia/Shanghai' }
})
expect(wrapper.find('time').text()).toContain('1970-01-01')
await wrapper.setProps({ time: date, type: 'datetime' })
expect(wrapper.find('time').text()).toContain('1970-01-01 08:00:00')