Add pluralization with interpolation test

This commit is contained in:
Christian Kaisermann 2018-08-15 22:21:08 -03:00
parent 50da3e798b
commit 10b44382b8

View File

@ -16,6 +16,7 @@ const locales = {
key: 'Olá, {0}! Como está {1}?',
named: 'Olá, {name}! Como está {time}?',
},
interpolationPluralization: 'One thingie | {0} thingies',
wow: {
much: {
deep: {
@ -141,6 +142,8 @@ describe('Localization', () => {
expect(_.plural('pluralization', -1000)).toBe('Muito!')
expect(_.plural('pluralization', 2)).toBe('Muito!')
expect(_.plural('pluralization', 100)).toBe('Muito!')
expect(_.plural('interpolationPluralization', 1)).toBe('One thingie')
expect(_.plural('interpolationPluralization', 10, [10])).toBe('10 thingies')
})
})