mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
Feature: document history (audit log UI) (#6388)
This commit is contained in:
@@ -30,4 +30,14 @@ describe('CustomDatePipe', () => {
|
||||
)
|
||||
).toEqual('2023-05-04')
|
||||
})
|
||||
|
||||
it('should support relative date formatting', () => {
|
||||
const now = new Date()
|
||||
const notNow = new Date(now)
|
||||
notNow.setDate(now.getDate() - 1)
|
||||
expect(datePipe.transform(notNow, 'relative')).toEqual('1 day ago')
|
||||
notNow.setDate(now.getDate() - 2)
|
||||
expect(datePipe.transform(notNow, 'relative')).toEqual('2 days ago')
|
||||
expect(datePipe.transform(now, 'relative')).toEqual('Just now')
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user