update TranslationApi formatting tests for node 16

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-09-16 11:37:21 +02:00
parent b5fbddc15d
commit cc8b053547
2 changed files with 12 additions and 10 deletions
@@ -98,7 +98,7 @@ describe('MockTranslationApi', () => {
relativeTime: '= {{ x, relativeTime }}',
relativeSeconds: '= {{ x, relativeTime(second) }}',
relativeSecondsShort:
'= {{ x, relativeTime(range: second; style: narrow) }}',
'= {{ x, relativeTime(range: second; style: short) }}',
list: '= {{ x, list }}',
});
@@ -123,10 +123,10 @@ describe('MockTranslationApi', () => {
expect(snapshot.t('relativeSeconds', { x: 2 })).toBe('= in 2 seconds');
expect(snapshot.t('relativeSeconds', { x: -3 })).toBe('= 3 seconds ago');
expect(snapshot.t('relativeSeconds', { x: 0 })).toBe('= in 0 seconds');
expect(snapshot.t('relativeSecondsShort', { x: 1 })).toBe('= in 1s');
expect(snapshot.t('relativeSecondsShort', { x: 2 })).toBe('= in 2s');
expect(snapshot.t('relativeSecondsShort', { x: -3 })).toBe('= 3s ago');
expect(snapshot.t('relativeSecondsShort', { x: 0 })).toBe('= in 0s');
expect(snapshot.t('relativeSecondsShort', { x: 1 })).toBe('= in 1 sec.');
expect(snapshot.t('relativeSecondsShort', { x: 2 })).toBe('= in 2 sec.');
expect(snapshot.t('relativeSecondsShort', { x: -3 })).toBe('= 3 sec. ago');
expect(snapshot.t('relativeSecondsShort', { x: 0 })).toBe('= in 0 sec.');
expect(snapshot.t('list', { x: ['a'] })).toBe('= a');
expect(snapshot.t('list', { x: ['a', 'b'] })).toBe('= a and b');
expect(snapshot.t('list', { x: ['a', 'b', 'c'] })).toBe('= a, b, and c');