]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: one more february relative date fix
authorshamoon <4887959+shamoon@users.noreply.github.com>
Tue, 11 Mar 2025 07:35:18 +0000 (00:35 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Tue, 11 Mar 2025 07:35:18 +0000 (00:35 -0700)
src-ui/src/app/pipes/custom-date.pipe.spec.ts

index c8a0e8749f1a7cf623430cbc6c5843d37a2b73e5..ebe480f088ed7d014a5a01ddc34dbc4b76bbebc3 100644 (file)
@@ -45,7 +45,8 @@ describe('CustomDatePipe', () => {
     if (now.getMonth() === 0) {
       notNow.setFullYear(now.getFullYear() - 1)
     }
-    expect(['Last month', '4 weeks ago']).toContain(
+    // weird options are for february...
+    expect(['Last month', '4 weeks ago', '3 weeks ago']).toContain(
       datePipe.transform(notNow, 'relative')
     )
     expect(datePipe.transform(now, 'relative')).toEqual('Just now')