test: fix timeago unit test (#1906)

This commit is contained in:
Nolan Lawson 2020-11-29 18:50:13 -08:00 committed by GitHub
parent 0022286b46
commit 6433a9c644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ const intlFormat = new Intl.RelativeTimeFormat(LOCALE)
function formatRelativeTime (number, index) {
if (index === 0) {
if (process.env.NODE_ENV === 'test') {
return require('../../../intl/en-US').justNow // only used in mocha tests
return require('../../../intl/en-US').default.justNow // only used in mocha tests
}
return 'intl.justNow'
}