test: add dot-separated middle-of-text date false positive test (#2195)

This commit is contained in:
kolaente
2026-02-06 09:59:01 +01:00
parent a82efa01b5
commit 829b10bfd2

View File

@@ -377,6 +377,13 @@ describe('Parse Task Text', () => {
expect(result.date).toBeNull()
})
})
it('should not parse a dot-separated date from the middle of text', () => {
const result = parseTaskText('The 1.2 formula')
expect(result.text).toBe('The 1.2 formula')
expect(result.date).toBeNull()
})
})
it('should not recognize date number with no spacing around them', () => {
const result = parseTaskText('Lorem Ispum v1.1.1')