Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Mock validateFeedback in the feedback page test

Steven Enamakel72eae9a0a745
diff --git a/app/src/pages/Feedback.test.tsx b/app/src/pages/Feedback.test.tsx
index 14b08b3c6a..462f58bc6b 100644
--- a/app/src/pages/Feedback.test.tsx
+++ b/app/src/pages/Feedback.test.tsx
@@ -21,6 +21,11 @@ vi.mock('../services/api/feedbackApi', () => ({
updateStatus: (...args: unknown[]) => mockUpdateStatus(...args),
getFeedback: (...args: unknown[]) => mockGetFeedback(...args),
addComment: (...args: unknown[]) => mockAddComment(...args),
+ // The submit form debounces an advisory quality check on the draft. Its
+ // `.catch` covers a *rejected* call, not a missing method: leaving this out
+ // makes the timer callback throw synchronously, which lands as an unhandled
+ // error after the test that rendered the form has already passed.
+ validateFeedback: () => Promise.resolve({ tier: 'pass', reason: '' }),
},
}));