File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
dev-packages/e2e-tests/test-applications/node-profiling Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1205,7 +1205,8 @@ jobs:
12051205 - name : Run E2E test
12061206 working-directory : dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
12071207 timeout-minutes : 10
1208- run : xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:assert
1208+ run :
1209+ xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:assert
12091210
12101211 job_required_jobs_passed :
12111212 name : All required jobs passed or were skipped
Original file line number Diff line number Diff line change 1+ // This tests asserts that @sentr /profiling-node is not patching globalThis values, which
2+ // breaks our runtime detection and can break instrumentation
3+ // https://github.com/getsentry/sentry-javascript/issues/14525#issuecomment-2511208064
4+
15function assertUnpatechedRequire ( cycle ) {
26 if ( globalThis . require !== undefined ) {
37 // Test that globalThis.require is not defined by any side effects of the profiling
48 // https://github.com/getsentry/sentry-javascript/issues/13662
59 throw new Error (
6- `globalThis.require should not be defined ${ cycle } , check that profiling integration is not defining it, received: ` +
10+ `globalThis.require should not be defined, check that profiling integration is not defining it, received: ` +
711 typeof globalThis . require ,
812 ) ;
913 }
1014}
1115
1216import * as Sentry from '@sentry/node' ;
1317import { nodeProfilingIntegration } from '@sentry/profiling-node' ;
14- assertUnpatechedRequire ( 'after importing sentry/profiling-node' ) ;
1518const wait = ms => new Promise ( resolve => setTimeout ( resolve , ms ) ) ;
1619
1720Sentry . init ( {
@@ -25,4 +28,4 @@ Sentry.startSpan({ name: 'Precompile test' }, async () => {
2528 await wait ( 500 ) ;
2629} ) ;
2730
28- assertUnpatechedRequire ( 'after a span was created' ) ;
31+ assertUnpatechedRequire ( ) ;
You can’t perform that action at this time.
0 commit comments