@@ -36,10 +36,6 @@ describe('onClientEntry', () => {
36
36
tracingAddExtensionMethods = jest . fn ( ) ;
37
37
} ) ;
38
38
39
- afterEach ( ( ) => {
40
- ( window as any ) . Sentry = undefined ;
41
- } ) ;
42
-
43
39
it . each ( [
44
40
[ { } , [ 'dsn' , 'release' ] ] ,
45
41
[ { key : 'value' } , [ 'dsn' , 'release' , 'key' ] ] ,
@@ -54,7 +50,6 @@ describe('onClientEntry', () => {
54
50
55
51
describe ( 'inits Sentry once' , ( ) => {
56
52
afterEach ( ( ) => {
57
- delete ( window as any ) . Sentry ;
58
53
delete ( window as any ) . __SENTRY__ ;
59
54
( global . console . warn as jest . Mock ) . mockClear ( ) ;
60
55
( global . console . error as jest . Mock ) . mockClear ( ) ;
@@ -78,7 +73,6 @@ describe('onClientEntry', () => {
78
73
// eslint-disable-next-line no-console
79
74
expect ( console . error ) . not . toHaveBeenCalled ( ) ;
80
75
expect ( sentryInit ) . not . toHaveBeenCalled ( ) ;
81
- expect ( ( window as any ) . Sentry ) . toBeDefined ( ) ;
82
76
} ) ;
83
77
84
78
it ( 'initialized in injected config, with pluginParams' , ( ) => {
@@ -94,7 +88,6 @@ describe('onClientEntry', () => {
94
88
// eslint-disable-next-line no-console
95
89
expect ( console . error ) . not . toHaveBeenCalled ( ) ;
96
90
expect ( sentryInit ) . not . toHaveBeenCalled ( ) ;
97
- expect ( ( window as any ) . Sentry ) . toBeDefined ( ) ;
98
91
} ) ;
99
92
100
93
it ( 'not initialized in injected config, without pluginParams' , ( ) => {
@@ -108,7 +101,6 @@ describe('onClientEntry', () => {
108
101
Learn how to configure it on https://docs.sentry.io/platforms/javascript/guides/gatsby/",
109
102
]
110
103
` ) ;
111
- expect ( ( window as any ) . Sentry ) . not . toBeDefined ( ) ;
112
104
} ) ;
113
105
114
106
it ( 'not initialized in injected config, with pluginParams' , ( ) => {
@@ -125,7 +117,6 @@ describe('onClientEntry', () => {
125
117
"release": "release",
126
118
}
127
119
` ) ;
128
- expect ( ( window as any ) . Sentry ) . toBeDefined ( ) ;
129
120
} ) ;
130
121
} ) ;
131
122
@@ -164,7 +155,6 @@ describe('onClientEntry', () => {
164
155
it ( 'does not run if plugin params are undefined' , ( ) => {
165
156
onClientEntry ( ) ;
166
157
expect ( sentryInit ) . toHaveBeenCalledTimes ( 0 ) ;
167
- expect ( ( window as any ) . Sentry ) . toBeUndefined ( ) ;
168
158
expect ( tracingAddExtensionMethods ) . toHaveBeenCalledTimes ( 0 ) ;
169
159
} ) ;
170
160
} ) ;
0 commit comments