sentry
sentry copied to clipboard
fix(ui): Add missing 'return' statement in <SourceMapsDebuggerModal />
Goal
The goal of this PR is to add a missing early return statement in static/app/components/ events/interfaces/sourceMapsDebuggerModal.tsx.
Approach
We add the missing return statement in the component's file, and also add a test file (sourceMapsDebuggerModal.spec.tsx) and a first test to cover this behavior of the component.
You can see that this test fails if you remove the fix in sourceMapsDebuggerModal.tsx.
According to Istanbul, this increases the statement coverage of the sourceMapsDebuggerModal.tsx file from 13%:
to 39%:
which shows we need to add more test cases to this test file.
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.89%. Comparing base (
276d1d5) to head (2b9902d). Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #70573 +/- ##
==========================================
+ Coverage 77.87% 77.89% +0.01%
==========================================
Files 6528 6528
Lines 290889 290889
Branches 50336 50336
==========================================
+ Hits 226544 226578 +34
+ Misses 58105 58088 -17
+ Partials 6240 6223 -17
| Files | Coverage Δ | |
|---|---|---|
| ...ents/events/interfaces/sourceMapsDebuggerModal.tsx | 33.93% <100.00%> (+22.42%) |
:arrow_up: |
Nice thanks!
Thanks! I think there are some checks that I need to be able to merge and that I cannot trigger myself as an external contributor. @lforst is that correct? If so, could you trigger them on your end? 🙏
Sorry, I was at react conf last week so this kinda slipped. I'll make sure this gets merged. Thanks for the bump!
Suspect Issues
This pull request was deployed and Sentry observed the following issues:
- ‼️ Error: useLocation() may be used only in the context of a <Router> component.
useLocation(useLocation.tsx)View Issue
Did you find this useful? React with a 👍 or 👎