Commit e2bff22
Fix spotlight config test assertion (#18196)
Before submitting a pull request, please take a look at our
[Contributing](https://github.com/getsentry/sentry-javascript/blob/master/CONTRIBUTING.md)
guidelines and verify:
- [x] If you've added code that should be tested, please add tests.
- [x] Ensure your code lints and the test suite passes (`yarn lint`) &
(`yarn test`).
Fixes a test failure where `process.env.SENTRY_SPOTLIGHT` was not
cleaned up after a test, causing environment variable pollution for
subsequent tests.
The failing test expected `spotlight: true` to resolve to `true`, but
due to the lingering environment variable, it received the URL from
`SENTRY_SPOTLIGHT` instead.
This PR adds an `afterEach` hook to the `spotlight configuration`
describe block to ensure `process.env.SENTRY_SPOTLIGHT` is deleted after
each test, preventing cross-test contamination.
---
<a
href="https://cursor.com/background-agent?bcId=bc-9f9696f9-3843-4420-b2e9-26aedf9b0e2e"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-cursor-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in
Cursor"
src="https://cursor.com/open-in-cursor.svg"></picture></a> <a
href="https://cursor.com/agents?id=bc-9f9696f9-3843-4420-b2e9-26aedf9b0e2e"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/open-in-web-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web"
src="https://cursor.com/open-in-web.svg"></picture></a>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>1 parent 738e214 commit e2bff22
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
221 | 225 | | |
222 | 226 | | |
223 | 227 | | |
| |||
0 commit comments