diff --git a/js/components/__tests__/__snapshots__/local_datetime.test.js.snap b/js/components/__tests__/__snapshots__/local_datetime.test.js.snap index 904778e1..78b3e555 100644 --- a/js/components/__tests__/__snapshots__/local_datetime.test.js.snap +++ b/js/components/__tests__/__snapshots__/local_datetime.test.js.snap @@ -1,3 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`LocalDatetime allows specifying a custom format 1`] = ``; + exports[`LocalDatetime matches snapshot 1`] = ``; diff --git a/js/components/__tests__/local_datetime.test.js b/js/components/__tests__/local_datetime.test.js index 1a44173b..969a797e 100644 --- a/js/components/__tests__/local_datetime.test.js +++ b/js/components/__tests__/local_datetime.test.js @@ -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() + }) })