test: fix timeago unit test (#1906)
This commit is contained in:
parent
0022286b46
commit
6433a9c644
|
@ -8,7 +8,7 @@ const intlFormat = new Intl.RelativeTimeFormat(LOCALE)
|
||||||
function formatRelativeTime (number, index) {
|
function formatRelativeTime (number, index) {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
if (process.env.NODE_ENV === 'test') {
|
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'
|
return 'intl.justNow'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue