@@ -36,10 +36,6 @@ describe('onClientEntry', () => {
3636 tracingAddExtensionMethods = jest . fn ( ) ;
3737 } ) ;
3838
39- afterEach ( ( ) => {
40- ( window as any ) . Sentry = undefined ;
41- } ) ;
42-
4339 it . each ( [
4440 [ { } , [ 'dsn' , 'release' ] ] ,
4541 [ { key : 'value' } , [ 'dsn' , 'release' , 'key' ] ] ,
@@ -54,7 +50,6 @@ describe('onClientEntry', () => {
5450
5551 describe ( 'inits Sentry once' , ( ) => {
5652 afterEach ( ( ) => {
57- delete ( window as any ) . Sentry ;
5853 delete ( window as any ) . __SENTRY__ ;
5954 ( global . console . warn as jest . Mock ) . mockClear ( ) ;
6055 ( global . console . error as jest . Mock ) . mockClear ( ) ;
@@ -78,7 +73,6 @@ describe('onClientEntry', () => {
7873 // eslint-disable-next-line no-console
7974 expect ( console . error ) . not . toHaveBeenCalled ( ) ;
8075 expect ( sentryInit ) . not . toHaveBeenCalled ( ) ;
81- expect ( ( window as any ) . Sentry ) . toBeDefined ( ) ;
8276 } ) ;
8377
8478 it ( 'initialized in injected config, with pluginParams' , ( ) => {
@@ -94,7 +88,6 @@ describe('onClientEntry', () => {
9488 // eslint-disable-next-line no-console
9589 expect ( console . error ) . not . toHaveBeenCalled ( ) ;
9690 expect ( sentryInit ) . not . toHaveBeenCalled ( ) ;
97- expect ( ( window as any ) . Sentry ) . toBeDefined ( ) ;
9891 } ) ;
9992
10093 it ( 'not initialized in injected config, without pluginParams' , ( ) => {
@@ -108,7 +101,6 @@ describe('onClientEntry', () => {
108101 Learn how to configure it on https://docs.sentry.io/platforms/javascript/guides/gatsby/",
109102 ]
110103 ` ) ;
111- expect ( ( window as any ) . Sentry ) . not . toBeDefined ( ) ;
112104 } ) ;
113105
114106 it ( 'not initialized in injected config, with pluginParams' , ( ) => {
@@ -125,7 +117,6 @@ describe('onClientEntry', () => {
125117 "release": "release",
126118 }
127119 ` ) ;
128- expect ( ( window as any ) . Sentry ) . toBeDefined ( ) ;
129120 } ) ;
130121 } ) ;
131122
@@ -164,7 +155,6 @@ describe('onClientEntry', () => {
164155 it ( 'does not run if plugin params are undefined' , ( ) => {
165156 onClientEntry ( ) ;
166157 expect ( sentryInit ) . toHaveBeenCalledTimes ( 0 ) ;
167- expect ( ( window as any ) . Sentry ) . toBeUndefined ( ) ;
168158 expect ( tracingAddExtensionMethods ) . toHaveBeenCalledTimes ( 0 ) ;
169159 } ) ;
170160} ) ;
0 commit comments