From 131f78277d489e0d3bbd123b321d3537a8b4414e Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 24 Jan 2026 00:00:46 +0100 Subject: [PATCH] feat(quick add magic): add more test cases --- frontend/src/modules/parseTaskText.test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/src/modules/parseTaskText.test.ts b/frontend/src/modules/parseTaskText.test.ts index 621fbe66f..d8e46ae03 100644 --- a/frontend/src/modules/parseTaskText.test.ts +++ b/frontend/src/modules/parseTaskText.test.ts @@ -509,6 +509,17 @@ describe('Parse Task Text', () => { 'june 21': '2022-6-21', 'June 21': '2022-6-21', '21st June': '2021-6-21', + '2nd March': '2021-3-2', + '2nd march': '2021-3-2', + '3rd April': '2021-4-3', + '1st January': '2021-1-1', + '22nd December': '2021-12-22', + '23rd October': '2021-10-23', + '4th July': '2021-7-4', + '15th August': '2021-8-15', + '31st December': '2021-12-31', + '5th Mar': '2021-3-5', + '12th Sep': '2021-9-12', 'jul 21': '2021-7-21', 'Jul 21': '2021-7-21', 'july 21': '2021-7-21', @@ -591,6 +602,13 @@ describe('Parse Task Text', () => { 'Something at 10:00 in 5 days': '2021-6-29 10:0', 'Something at 10:00 17th': '2021-7-17 10:0', 'Something at 10:00 sep 17th': '2021-9-17 10:0', + '2nd March at 5': '2021-3-2 5:0', + '2nd March at 5pm': '2021-3-2 17:0', + '2nd March @ 14:00': '2021-3-2 14:0', + '3rd April at 10:30': '2021-4-3 10:30', + '15th August @ 9am': '2021-8-15 9:0', + '21st June at 18:45': '2021-6-21 18:45', + '5th Mar at 3pm': '2021-3-5 15:0', } as Record for (const c in cases) {