We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cf4215 commit 5fdb0f2Copy full SHA for 5fdb0f2
functions/src/events/helpers.test.ts
@@ -1,4 +1,4 @@
1
-import { subDays } from "date-fns"
+import { addDays, subDays } from "date-fns"
2
import { withinCutoff } from "./helpers"
3
4
describe("withinCutoff true", () => {
@@ -27,4 +27,13 @@ describe("withinCutoff true", () => {
27
const result = withinCutoff(threeDaysAgo)
28
expect(result).toEqual(false)
29
})
30
+
31
+ it("should return false for a date that is 2 days in the future", () => {
32
+ const now = new Date()
33
34
+ const threeDaysAgo = addDays(now, 2)
35
36
+ const result = withinCutoff(threeDaysAgo)
37
+ expect(result).toEqual(false)
38
+ })
39
0 commit comments