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', () => {
4
4
test ( 'Injects fetch proxy script for SvelteKit<2.16.0' , async ( { page } ) => {
5
5
await page . goto ( '/' ) ;
6
6
7
- const sentryCarrier = await page . evaluate ( 'typeof window.__SENTRY__' ) ;
7
+ // @ts -expect-error this is defined
8
+ await page . waitForFunction ( ( ) => typeof window . __SENTRY__ === 'object' ) ;
8
9
const proxyHandle = await page . evaluate ( 'typeof window._sentryFetchProxy' ) ;
9
10
10
- // sanity check
11
- expect ( sentryCarrier ) . toBe ( 'object' ) ;
12
-
13
11
// fetch proxy script ran
14
12
expect ( proxyHandle ) . toBe ( 'function' ) ;
15
13
} ) ;
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import { waitForInitialPageload } from './utils';
4
4
test . describe ( 'SDK-internal behavior' , ( ) => {
5
5
test ( "Doesn't inject fetch proxy script for SvelteKit>=2.16.0" , async ( { page } ) => {
6
6
await waitForInitialPageload ( page , { route : '/' } ) ;
7
- const sentryCarrier = await page . evaluate ( 'typeof window.__SENTRY__' ) ;
8
- const proxyHandle = await page . evaluate ( 'typeof window._sentryFetchProxy' ) ;
9
7
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' ) ;
12
12
13
13
// fetch proxy script didn't run
14
14
expect ( proxyHandle ) . toBe ( 'undefined' ) ;
You can’t perform that action at this time.
0 commit comments