Skip to content

Commit 9502a51

Browse files
committed
Fix evaluate
1 parent a0bb28c commit 9502a51

File tree

1 file changed

+19
-20
lines changed
  • dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders

1 file changed

+19
-20
lines changed

dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/test.ts

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -271,26 +271,25 @@ sentryTest('captures request headers as Headers instance', async ({ getLocalTest
271271

272272
const url = await getLocalTestPath({ testDir: __dirname });
273273

274-
await Promise.all([
275-
page.goto(url),
276-
page.evaluate(() => {
277-
const headers = new Headers();
278-
headers.append('Accept', 'application/json');
279-
headers.append('Content-Type', 'application/json');
280-
headers.append('Cache', 'no-cache');
281-
headers.append('X-Custom-Header', 'foo');
282-
283-
/* eslint-disable */
284-
fetch('http://localhost:7654/foo', {
285-
method: 'POST',
286-
headers,
287-
}).then(() => {
288-
// @ts-expect-error Sentry is a global
289-
Sentry.captureException('test error');
290-
});
291-
/* eslint-enable */
292-
}),
293-
]);
274+
await page.goto(url);
275+
276+
await page.evaluate(() => {
277+
const headers = new Headers();
278+
headers.append('Accept', 'application/json');
279+
headers.append('Content-Type', 'application/json');
280+
headers.append('Cache', 'no-cache');
281+
headers.append('X-Custom-Header', 'foo');
282+
283+
/* eslint-disable */
284+
fetch('http://localhost:7654/foo', {
285+
method: 'POST',
286+
headers,
287+
}).then(() => {
288+
// @ts-expect-error Sentry is a global
289+
Sentry.captureException('test error');
290+
});
291+
/* eslint-enable */
292+
});
294293

295294
const request = await requestPromise;
296295
const eventData = envelopeRequestParser(request);

0 commit comments

Comments
 (0)