Skip to content

Commit

Permalink
Add missing LTS format in x-pseudo locale
Browse files Browse the repository at this point in the history
  • Loading branch information
aadityataparia committed Apr 5, 2019
1 parent 978f197 commit fc65da5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ package-lock.json
coverage

# build
/locale
/locale*
/moment*
/plugin
dayjs.min.js
/esm
Expand Down
1 change: 1 addition & 0 deletions src/locale/x-pseudo.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const locale = {
ordinal: n => n,
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
Expand Down
16 changes: 3 additions & 13 deletions test/locale/keys.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ fs.readdirSync(path.join(__dirname, localeDir))
})
})

const noRelTime = []
Locale.forEach((locale) => {
it(`Locale keys for ${locale.content.name}`, () => {
const {
Expand Down Expand Up @@ -77,18 +76,9 @@ Locale.forEach((locale) => {
if (llll) expect(llll).toEqual(expect.any(String))
}
if (relativeTime) {
try {
expect(Object.keys(relativeTime).sort()).toEqual(['d', 'dd', 'future', 'h', 'hh', 'm', 'mm', 'M', 'MM',
'past', 's', 'y', 'yy']
.sort())
} catch (e) {
noRelTime.push(locale.content.name)
}
expect(Object.keys(relativeTime).sort()).toEqual(['d', 'dd', 'future', 'h', 'hh', 'm', 'mm', 'M', 'MM',
'past', 's', 'y', 'yy']
.sort())
}
})
})

afterAll(() => {
console.log(noRelTime)
})

0 comments on commit fc65da5

Please sign in to comment.