File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
dev-packages/e2e-tests/test-applications
sveltekit-2.5.0-twp/tests Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,10 @@ test.describe('SDK-internal behavior', () => {
44 test ( 'Injects fetch proxy script for SvelteKit<2.16.0' , async ( { page } ) => {
55 await page . goto ( '/' ) ;
66
7- const sentryCarrier = await page . evaluate ( 'typeof window.__SENTRY__' ) ;
7+ // @ts -expect-error this is defined
8+ await page . waitForFunction ( ( ) => typeof window . __SENTRY__ === 'object' ) ;
89 const proxyHandle = await page . evaluate ( 'typeof window._sentryFetchProxy' ) ;
910
10- // sanity check
11- expect ( sentryCarrier ) . toBe ( 'object' ) ;
12-
1311 // fetch proxy script ran
1412 expect ( proxyHandle ) . toBe ( 'function' ) ;
1513 } ) ;
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import { waitForInitialPageload } from './utils';
44test . describe ( 'SDK-internal behavior' , ( ) => {
55 test ( "Doesn't inject fetch proxy script for SvelteKit>=2.16.0" , async ( { page } ) => {
66 await waitForInitialPageload ( page , { route : '/' } ) ;
7- const sentryCarrier = await page . evaluate ( 'typeof window.__SENTRY__' ) ;
8- const proxyHandle = await page . evaluate ( 'typeof window._sentryFetchProxy' ) ;
97
10- // sanity check
11- expect ( sentryCarrier ) . toBe ( 'object' ) ;
8+ // @ts -expect-error this is defined
9+ await page . waitForFunction ( ( ) => typeof window . __SENTRY__ === 'object' ) ;
10+
11+ const proxyHandle = await page . evaluate ( 'typeof window._sentryFetchProxy' ) ;
1212
1313 // fetch proxy script didn't run
1414 expect ( proxyHandle ) . toBe ( 'undefined' ) ;
You can’t perform that action at this time.
0 commit comments