From 452b838180a4bc4f97ca39482e58a5ad84873767 Mon Sep 17 00:00:00 2001 From: contributor Date: Sun, 16 Nov 2025 14:09:56 +0200 Subject: [PATCH] edited notes: add happy path tests --- apps/server/src/routes/api/edited-notes.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/server/src/routes/api/edited-notes.spec.ts b/apps/server/src/routes/api/edited-notes.spec.ts index a3f022e37..fbc0d0842 100644 --- a/apps/server/src/routes/api/edited-notes.spec.ts +++ b/apps/server/src/routes/api/edited-notes.spec.ts @@ -62,6 +62,18 @@ describe("edited-notes::resolveDateParams", () => { runTest("YEAR-1", expectedYearMinus1); }); + it("returns original string for day", () => { + runTest("2020-12-31", "2020-12-31"); + }); + + it("returns original string for month", () => { + runTest("2020-12", "2020-12"); + }); + + it("returns original string for year", () => { + runTest("2020", "2020"); + }); + it("returns original string for unrecognized keyword", () => { runTest("FOO", "FOO"); });