From 546082523a00837ed56ae0db7435aa508aa94584 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Wed, 24 Apr 2024 09:41:31 +0100 Subject: [PATCH] Await `runScriptInSandbox`. --- .../public-api/instrumentation/onError/non-string-arg/test.ts | 2 +- .../suites/public-api/instrumentation/onError/rethrown/test.ts | 2 +- .../public-api/instrumentation/onError/syntax-errors/test.ts | 2 +- .../public-api/instrumentation/onError/thrown-errors/test.ts | 2 +- .../public-api/instrumentation/onError/thrown-strings/test.ts | 2 +- .../suites/public-api/startSpan/error-sync/test.ts | 2 +- .../suites/tracing/browserTracingIntegration/error/test.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts index ee7e5193d477..681d5db8bf02 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts @@ -18,7 +18,7 @@ sentryTest( const errorEventPromise = getFirstSentryEnvelopeRequest(page); - runScriptInSandbox(page, { + await runScriptInSandbox(page, { content: ` throw { type: 'Error', diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/test.ts index 8058aa77d6c9..01b319e759b2 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/test.ts @@ -18,7 +18,7 @@ sentryTest( const errorEventsPromise = getMultipleSentryEnvelopeRequests(page, 2); - runScriptInSandbox(page, { + await runScriptInSandbox(page, { content: ` try { try { diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts index d218deecc27f..2b6cc09be8a2 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/syntax-errors/test.ts @@ -16,7 +16,7 @@ sentryTest('should catch syntax errors', async ({ getLocalTestPath, page, browse const errorEventPromise = getFirstSentryEnvelopeRequest(page); - runScriptInSandbox(page, { + await runScriptInSandbox(page, { content: ` foo{}; // SyntaxError `, diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts index 413de04d3587..17dd6c650b43 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-errors/test.ts @@ -16,7 +16,7 @@ sentryTest('should catch thrown errors', async ({ getLocalTestPath, page, browse const errorEventPromise = getFirstSentryEnvelopeRequest(page); - runScriptInSandbox(page, { + await runScriptInSandbox(page, { content: ` throw new Error('realError'); `, diff --git a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts index a391cfa02b05..326cf414f0f8 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/thrown-strings/test.ts @@ -16,7 +16,7 @@ sentryTest('should catch thrown strings', async ({ getLocalTestPath, page, brows const errorEventPromise = getFirstSentryEnvelopeRequest(page); - runScriptInSandbox(page, { + await runScriptInSandbox(page, { content: ` throw 'stringError'; `, diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts index 0d4a1576f12e..bb7b3b43c516 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts @@ -26,7 +26,7 @@ sentryTest( const errorEventsPromise = getMultipleSentryEnvelopeRequests(page, 2); - runScriptInSandbox(page, { + await runScriptInSandbox(page, { content: ` function run() { Sentry.startSpan({ name: 'parent_span' }, () => { diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts index 3f44cc8f069c..581f0fd206dc 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts @@ -25,7 +25,7 @@ sentryTest( const errorEventsPromise = getMultipleSentryEnvelopeRequests(page, 2); - runScriptInSandbox(page, { + await runScriptInSandbox(page, { content: ` throw new Error('Error during pageload'); `,