From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 1 Mar 2025 17:54:03 +0000 (-0800) Subject: Fix: fix date pipe test for day after February X-Git-Tag: v2.15.0-beta.rc1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc90ccc5551f184a683128def772652ad74c65e3;p=thirdparty%2Fpaperless-ngx.git Fix: fix date pipe test for day after February --- diff --git a/src-ui/src/app/pipes/custom-date.pipe.spec.ts b/src-ui/src/app/pipes/custom-date.pipe.spec.ts index aef722cf9..c8a0e8749 100644 --- a/src-ui/src/app/pipes/custom-date.pipe.spec.ts +++ b/src-ui/src/app/pipes/custom-date.pipe.spec.ts @@ -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') }) })