Skip to content

Commit

Permalink
fix(gatsby): feedback test did not reset 7day check (#27810)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdz authored Nov 3, 2020
1 parent 89c6459 commit 425c6d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/gatsby/src/utils/__tests__/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const clearStateToAllowHeuristicsToPass = (): void => {
delete process.env.GATSBY_FEEDBACK_DISABLED
// Heuristic 4
getConfigStore().set(`feedback.lastRequestDate`, dateFromSixMonthsAgo)
getConfigStore().set(`feedback.sevenDayFeedbackDate`, dateFromSixMonthsAgo)
// Heuristic 5
;(getGatsbyVersion as jest.Mock).mockReturnValue(`2.1.1`)
}
Expand Down
1 change: 1 addition & 0 deletions packages/gatsby/src/utils/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export async function userPassesFeedbackRequestHeuristic(): Promise<boolean> {
}
}

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

0 comments on commit 425c6d6

Please sign in to comment.