diff --git a/src/helpers/parseTaskText.test.js b/src/helpers/parseTaskText.test.js index 459ad628d..94382558f 100644 --- a/src/helpers/parseTaskText.test.js +++ b/src/helpers/parseTaskText.test.js @@ -168,7 +168,6 @@ describe('Parse Task Text', () => { const nextThursday = new Date() nextThursday.setDate(nextThursday.getDate() + ((4 + 7 - nextThursday.getDay()) % 7)) expect(`${result.date.getFullYear()}-${result.date.getMonth()}-${result.date.getDate()}`).toBe(`${nextThursday.getFullYear()}-${nextThursday.getMonth()}-${nextThursday.getDate()}`) - expect(+new Date(result.date)).toBeGreaterThan(+new Date() - 10) // In on thursdays, this may be different by one second and thus fails the test }) it('should recognize weekdays with time', () => { const result = parseTaskText('Lorem Ipsum thu at 14:00') @@ -178,7 +177,6 @@ describe('Parse Task Text', () => { nextThursday.setDate(nextThursday.getDate() + ((4 + 7 - nextThursday.getDay()) % 7)) expect(`${result.date.getFullYear()}-${result.date.getMonth()}-${result.date.getDate()}`).toBe(`${nextThursday.getFullYear()}-${nextThursday.getMonth()}-${nextThursday.getDate()}`) expect(`${result.date.getHours()}:${result.date.getMinutes()}`).toBe('14:0') - expect(+new Date(result.date)).toBeGreaterThan(+new Date() - 10) // In on thursdays, this may be different by one second and thus fails the test }) it('should recognize dates of the month in the past but next month', () => { const date = new Date()