diff options
| author | Henry Jameson <me@hjkos.com> | 2022-06-27 14:49:31 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-06-27 14:49:31 +0300 |
| commit | 4dc4a912247801733cfc093d6cda38ca48a9d7c4 (patch) | |
| tree | afa8a9f93cf4600ce9a549427b1c2c3e877761fe /test | |
| parent | 55e9acc4adcdde0d2a35dfdb73d938634872189b (diff) | |
| parent | 56501e95c42859a826ad0f0b11de4e6b189b9f92 (diff) | |
Merge remote-tracking branch 'origin/develop' into disjointed-popovers
* origin/develop:
add SK (Slovak) translation
ReactButton: Workaround for android composition mode
EmojiPicker: Workaround to search immediately on mobile
Fix top bar input text colour
Show underlay for mobile
Fix tests
Add English translations for correctly i18nized time units
Delegate relativeTime plural rules to vue-i18n
restore notifications page, fix z-index issues
Make lint happy
Add English translations for backup UI
Add backup UI
Add English translation for list aliases error
Log errors when listing aliases
Add changelog
Add Engilsh translation for migration
Add frontend ui for aliases and migration
Change translation key
Explain better what delete does in moderation menu
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/specs/services/date_utils/date_utils.spec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/specs/services/date_utils/date_utils.spec.js b/test/unit/specs/services/date_utils/date_utils.spec.js index 2d61dbac..bd1efe81 100644 --- a/test/unit/specs/services/date_utils/date_utils.spec.js +++ b/test/unit/specs/services/date_utils/date_utils.spec.js @@ -11,30 +11,30 @@ describe('DateUtils', () => { it('rounds down for past', () => { const time = Date.now() - 1.8 * DateUtils.HOUR - expect(DateUtils.relativeTime(time)).to.eql({ num: 1, key: 'time.hour' }) + expect(DateUtils.relativeTime(time)).to.eql({ num: 1, key: 'time.unit.hours' }) }) it('rounds up for future', () => { const time = Date.now() + 1.8 * DateUtils.HOUR - expect(DateUtils.relativeTime(time)).to.eql({ num: 2, key: 'time.hours' }) + expect(DateUtils.relativeTime(time)).to.eql({ num: 2, key: 'time.unit.hours' }) }) it('uses plural when necessary', () => { const time = Date.now() - 3.8 * DateUtils.WEEK - expect(DateUtils.relativeTime(time)).to.eql({ num: 3, key: 'time.weeks' }) + expect(DateUtils.relativeTime(time)).to.eql({ num: 3, key: 'time.unit.weeks' }) }) it('works with date string', () => { const time = Date.now() - 4 * DateUtils.MONTH const dateString = new Date(time).toISOString() - expect(DateUtils.relativeTime(dateString)).to.eql({ num: 4, key: 'time.months' }) + expect(DateUtils.relativeTime(dateString)).to.eql({ num: 4, key: 'time.unit.months' }) }) }) describe('relativeTimeShort', () => { it('returns the short version of the same relative time', () => { const time = Date.now() + 2 * DateUtils.YEAR - expect(DateUtils.relativeTimeShort(time)).to.eql({ num: 2, key: 'time.years_short' }) + expect(DateUtils.relativeTimeShort(time)).to.eql({ num: 2, key: 'time.unit.years_short' }) }) }) }) |
