You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/BUGBOT.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,11 @@ Do not flag the issues below if they appear in tests.
58
58
- Flag usage of `expect.objectContaining` and other relaxed assertions, when a test expects something NOT to be included in a payload but there's no respective assertion.
59
59
- Flag usage of conditionals in one test and recommend splitting up the test for the different paths.
60
60
- Flag usage of loops testing multiple scenarios in one test and recommend using `(it)|(test).each` instead.
61
+
- Flag tests that are likely to introduce flakes. In our case this usually means we wait for some telemetry requests sent from an SDK. Patterns to look out for:
62
+
- Only waiting for a request, after an action is performed. Instead, start waiting, perform action, await request promise.
63
+
- Race conditions when waiting on multiple requests. Ensure that waiting checks are unique enough and don't depend on a hard order when there's a chance that telemetry can be sent in arbitrary order.
64
+
- Timeouts or sleeps in tests. Instead suggest concrete events or other signals to wait on.
65
+
- Flag usage of `getFirstEnvelope*`, `getMultipleEnvelope*` or related test helpers. These are NOT reliable anymore. Instead suggest helpers like `waitForTransaction`, `waitForError`, `waitForSpans`, etc.
0 commit comments