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 c35ec01 commit 3b03904Copy full SHA for 3b03904
functions/src/events/helpers.test.ts
@@ -1,7 +1,7 @@
1
import { subDays } from "date-fns"
2
import { withinCutoff } from "./helpers"
3
4
-describe("withinCutoff", () => {
+describe("withinCutoff true", () => {
5
beforeEach(() => {
6
jest.useFakeTimers()
7
})
@@ -18,4 +18,13 @@ describe("withinCutoff", () => {
18
const result = withinCutoff(threeDaysAgo)
19
expect(result).toEqual(true)
20
21
+
22
+ it("should return false for a date that is 9 days ago", () => {
23
+ const now = new Date()
24
25
+ const threeDaysAgo = subDays(now, 9)
26
27
+ const result = withinCutoff(threeDaysAgo)
28
+ expect(result).toEqual(false)
29
+ })
30
0 commit comments