Skip to content

Commit

Permalink
Mock locale formats before checking for em fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
aadityataparia committed Apr 5, 2019
1 parent c23b6be commit 978f197
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/plugin/localizableFormat.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ it('Uses English formats in other locales as default', () => {
const actualDate = dayjs(date)
const expectedDate = moment(date)
// todo: ar here isn't a good fix here
const arOldFormats = ar.formats
ar.formats = {}
expect(actualDate.locale(ar).format('L')).toBe(expectedDate.format('L'))
ar.formats = arOldFormats
})

it('Leaves the default format intact', () => {
Expand Down

0 comments on commit 978f197

Please sign in to comment.