18 lines
452 B
JavaScript
18 lines
452 B
JavaScript
import { shallowMount } from '@vue/test-utils'
|
|
|
|
import LocalDatetime from '../local_datetime'
|
|
|
|
|
|
describe('LocalDatetime', () => {
|
|
const wrapper = shallowMount(LocalDatetime, { propsData: { timestamp: '1977-05-25 00:00:00' } })
|
|
|
|
it('renders a time element', () => {
|
|
expect(wrapper.html()).toContain('<time')
|
|
expect(wrapper.html()).toContain('May 25 1977')
|
|
})
|
|
|
|
it('matches snapshot', () => {
|
|
expect(wrapper).toMatchSnapshot()
|
|
})
|
|
})
|