Add additional snapshot test
This commit is contained in:
parent
fae3aa12e1
commit
d5270fa97d
@ -1,3 +1,5 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`LocalDatetime allows specifying a custom format 1`] = `<time datetime="1977-05-25 00:00:00">May 25th 77</time>`;
|
||||
|
||||
exports[`LocalDatetime matches snapshot 1`] = `<time datetime="1977-05-25 00:00:00">May 25 1977 0:00</time>`;
|
||||
|
@ -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()
|
||||
})
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user