Skip to content

Commit cd974e4

Browse files
committed
test run
1 parent df0d758 commit cd974e4

File tree

2 files changed

+8
-4
lines changed
  • .github/workflows
  • dev-packages/e2e-tests/test-applications/node-profiling

2 files changed

+8
-4
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

dev-packages/e2e-tests/test-applications/node-profiling/index.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
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+
15
function 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

1216
import * as Sentry from '@sentry/node';
1317
import { nodeProfilingIntegration } from '@sentry/profiling-node';
14-
assertUnpatechedRequire('after importing sentry/profiling-node');
1518
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
1619

1720
Sentry.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();

0 commit comments

Comments
 (0)