test: fix timeago unit test (#1906)

pull/1907/head
Nolan Lawson 2020-11-29 18:50:13 -08:00 zatwierdzone przez GitHub
rodzic 0022286b46
commit 6433a9c644
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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'
}