Commit d8dd265
authored
test(react): Remove duplicated test mock (#20200)
The `getActiveSpan` mock calls `actual.getActiveSpan()` and immediately
assigns to the returned span without guarding
against `undefined`. When the router subscriber fires outside an active
span context, `span` is `undefined` and the property assignment throws a
TypeError.
Additionally, there are two `vi.mock('@sentry/core')` declarations for
the same module; the first (lines 66-73) is dead code since the second
one overrides it.
Closes #201991 parent a641812 commit d8dd265
1 file changed
+2
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 66 | | |
76 | 67 | | |
77 | 68 | | |
| |||
82 | 73 | | |
83 | 74 | | |
84 | 75 | | |
| 76 | + | |
| 77 | + | |
85 | 78 | | |
86 | 79 | | |
87 | 80 | | |
| |||
0 commit comments