Skip to content

Commit 425c6d6

Browse files
authored
fix(gatsby): feedback test did not reset 7day check (#27810)
1 parent 89c6459 commit 425c6d6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/gatsby/src/utils/__tests__/feedback.ts

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const clearStateToAllowHeuristicsToPass = (): void => {
3838
delete process.env.GATSBY_FEEDBACK_DISABLED
3939
// Heuristic 4
4040
getConfigStore().set(`feedback.lastRequestDate`, dateFromSixMonthsAgo)
41+
getConfigStore().set(`feedback.sevenDayFeedbackDate`, dateFromSixMonthsAgo)
4142
// Heuristic 5
4243
;(getGatsbyVersion as jest.Mock).mockReturnValue(`2.1.1`)
4344
}

packages/gatsby/src/utils/feedback.ts

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export async function userPassesFeedbackRequestHeuristic(): Promise<boolean> {
9797
}
9898
}
9999

100+
// 4.b
100101
// we don't want to give them this survey right after the seven day feedback survey
101102
const sevenDayFeedback = getConfigStore().get(sevenDayKey)
102103
if (sevenDayFeedback) {

0 commit comments

Comments
 (0)