Skip to content

Commit c9995b9

Browse files
committed
Fix test
1 parent 850d921 commit c9995b9

File tree

1 file changed

+0
-13
lines changed
  • dev-packages/browser-integration-tests/suites/tracing/trace-lifetime/startNewTraceSampling

1 file changed

+0
-13
lines changed

dev-packages/browser-integration-tests/suites/tracing/trace-lifetime/startNewTraceSampling/init.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,9 @@ import * as Sentry from '@sentry/browser';
22

33
window.Sentry = Sentry;
44

5-
const originalRandom = Math.random;
6-
75
// Force this so that the initial sampleRand is between 0.35 and 0.45
86
Math.random = () => 0.35 + Math.random() * 0.1;
97

10-
// polyfill for crypto.randomUUID if not available (e.g. in non-secure contexts)
11-
window.crypto = window.crypto || {};
12-
window.crypto.randomUUID =
13-
window.crypto.randomUUID ||
14-
(() => {
15-
return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, c =>
16-
// eslint-disable-next-line no-bitwise
17-
(c ^ (((originalRandom() * 16) & 15) >> (c / 4))).toString(16),
18-
);
19-
});
20-
218
Sentry.init({
229
dsn: 'https://[email protected]/1337',
2310
integrations: [Sentry.browserTracingIntegration()],

0 commit comments

Comments
 (0)