Commit ce30f02
committed
fix(nextjs): Update Spotlight test to explicitly pass spotlight option
In Next.js 15 Turbopack dev mode, custom loaders aren't applied to
instrumentation files, and process.env replacements don't work in
node_modules code. This means the auto-detection mechanism doesn't work.
As a workaround, the test now explicitly reads the env var in the user's
instrumentation-client.ts (where Next.js DOES replace process.env values)
and passes it to Sentry.init() as the spotlight option.
This ensures the Spotlight integration is properly tested while
acknowledging the Turbopack limitation.1 parent 67d1d4b commit ce30f02
File tree
2 files changed
+11
-31
lines changed- dev-packages/e2e-tests/test-applications/nextjs-15-spotlight
- tests
2 files changed
+11
-31
lines changedLines changed: 8 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
19 | | - | |
20 | | - | |
| 15 | + | |
| 16 | + | |
21 | 17 | | |
Lines changed: 3 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 3 | + | |
| 4 | + | |
16 | 5 | | |
17 | 6 | | |
18 | 7 | | |
19 | 8 | | |
20 | 9 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 10 | + | |
26 | 11 | | |
27 | 12 | | |
28 | 13 | | |
29 | 14 | | |
30 | 15 | | |
31 | | - | |
32 | 16 | | |
33 | 17 | | |
34 | 18 | | |
| |||
0 commit comments