Fix: fix date pipe test for day after February

This commit is contained in:
shamoon 2025-03-01 09:54:03 -08:00
parent 90a332a02c
commit bc90ccc555

View File

@ -45,7 +45,9 @@ describe('CustomDatePipe', () => {
if (now.getMonth() === 0) {
notNow.setFullYear(now.getFullYear() - 1)
}
expect(datePipe.transform(notNow, 'relative')).toEqual('Last month')
expect(['Last month', '4 weeks ago']).toContain(
datePipe.transform(notNow, 'relative')
)
expect(datePipe.transform(now, 'relative')).toEqual('Just now')
})
})