Add additional snapshot test

This commit is contained in:
Patrick Smith
2018-11-20 10:02:17 -05:00
parent fae3aa12e1
commit d5270fa97d
2 changed files with 14 additions and 0 deletions

View File

@@ -14,4 +14,16 @@ describe('LocalDatetime', () => {
it('matches snapshot', () => {
expect(wrapper).toMatchSnapshot()
})
it('allows specifying a custom format', () => {
const wrapperWithCustomFormat = shallowMount(
LocalDatetime, {
propsData: {
timestamp: '1977-05-25 00:00:00',
format: 'MMM Do YY'
}
}
)
expect(wrapperWithCustomFormat).toMatchSnapshot()
})
})