diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/specs/components/rich_content.spec.js | 2 | ||||
| -rw-r--r-- | test/unit/specs/services/date_utils/date_utils.spec.js | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index a4920867..958fb997 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -308,10 +308,8 @@ describe('RichContent', () => { '<a href="http://macrochan.org/images/N/H/NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg" target="_blank">', 'NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg</a>', ' <hashtag-link-stub url="https://shitposter.club/tag/nou" content="#nou" tag="nou">', - '#nou', '</hashtag-link-stub>', ' <hashtag-link-stub url="https://shitposter.club/tag/screencap" content="#screencap" tag="screencap">', - '#screencap', '</hashtag-link-stub>', ' </p>' ].join('') 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' }) }) }) }) |
