@@ -82,11 +82,11 @@ const usedOptions = (): ClientOptions<BaseTransportOptions> | undefined => {
8282 return mockedInitAndBind . mock . calls [ 0 ] ?. [ 1 ] ;
8383} ;
8484
85- afterEach ( ( ) => {
86- jest . clearAllMocks ( ) ;
87- } ) ;
88-
8985describe ( 'Tests the SDK functionality' , ( ) => {
86+ afterEach ( ( ) => {
87+ jest . clearAllMocks ( ) ;
88+ } ) ;
89+
9090 describe ( 'init' , ( ) => {
9191 describe ( 'enableAutoPerformanceTracing' , ( ) => {
9292 const usedOptions = ( ) : Integration [ ] => {
@@ -163,7 +163,6 @@ describe('Tests the SDK functionality', () => {
163163 if ( mockClient ) {
164164 const flushResult = await flush ( ) ;
165165
166- // eslint-disable-next-line @typescript-eslint/unbound-method
167166 expect ( mockClient . flush ) . toBeCalled ( ) ;
168167 expect ( flushResult ) . toBe ( true ) ;
169168 }
@@ -178,10 +177,8 @@ describe('Tests the SDK functionality', () => {
178177
179178 const flushResult = await flush ( ) ;
180179
181- // eslint-disable-next-line @typescript-eslint/unbound-method
182180 expect ( mockClient . flush ) . toBeCalled ( ) ;
183181 expect ( flushResult ) . toBe ( false ) ;
184- // eslint-disable-next-line @typescript-eslint/unbound-method
185182 expect ( logger . error ) . toBeCalledWith ( 'Failed to flush the event queue.' ) ;
186183 }
187184 } ) ;
@@ -219,7 +216,6 @@ describe('Tests the SDK functionality', () => {
219216 it ( 'fetchTransport set and enableNative set to false' , ( ) => {
220217 ( NATIVE . isNativeAvailable as jest . Mock ) . mockImplementation ( ( ) => false ) ;
221218 init ( { } ) ;
222- // eslint-disable-next-line @typescript-eslint/unbound-method
223219 expect ( NATIVE . isNativeAvailable ) . toBeCalled ( ) ;
224220 // @ts -ignore enableNative not publicly available here.
225221 expect ( usedOptions ( ) ?. enableNative ) . toEqual ( false ) ;
@@ -229,7 +225,6 @@ describe('Tests the SDK functionality', () => {
229225 it ( 'fetchTransport set and passed enableNative ignored when true' , ( ) => {
230226 ( NATIVE . isNativeAvailable as jest . Mock ) . mockImplementation ( ( ) => false ) ;
231227 init ( { enableNative : true } ) ;
232- // eslint-disable-next-line @typescript-eslint/unbound-method
233228 expect ( NATIVE . isNativeAvailable ) . toBeCalled ( ) ;
234229 // @ts -ignore enableNative not publicly available here.
235230 expect ( usedOptions ( ) ?. enableNative ) . toEqual ( false ) ;
@@ -239,7 +234,6 @@ describe('Tests the SDK functionality', () => {
239234 it ( 'fetchTransport set and isNativeAvailable not called when passed enableNative set to false' , ( ) => {
240235 ( NATIVE . isNativeAvailable as jest . Mock ) . mockImplementation ( ( ) => false ) ;
241236 init ( { enableNative : false } ) ;
242- // eslint-disable-next-line @typescript-eslint/unbound-method
243237 expect ( NATIVE . isNativeAvailable ) . not . toBeCalled ( ) ;
244238 // @ts -ignore enableNative not publicly available here.
245239 expect ( usedOptions ( ) ?. enableNative ) . toEqual ( false ) ;
@@ -253,7 +247,6 @@ describe('Tests the SDK functionality', () => {
253247 transport : mockTransport ,
254248 } ) ;
255249 expect ( usedOptions ( ) ?. transport ) . toEqual ( mockTransport ) ;
256- // eslint-disable-next-line @typescript-eslint/unbound-method
257250 expect ( NATIVE . isNativeAvailable ) . toBeCalled ( ) ;
258251 // @ts -ignore enableNative not publicly available here.
259252 expect ( usedOptions ( ) ?. enableNative ) . toEqual ( false ) ;
@@ -284,15 +277,13 @@ describe('Tests the SDK functionality', () => {
284277 ( NATIVE . isNativeAvailable as jest . Mock ) . mockImplementation ( ( ) => true ) ;
285278 init ( { enableNative : false } ) ;
286279 expect ( usedOptions ( ) ?. transport ) . toEqual ( makeFetchTransport ) ;
287- // eslint-disable-next-line @typescript-eslint/unbound-method
288280 expect ( NATIVE . isNativeAvailable ) . not . toBeCalled ( ) ;
289281 } ) ;
290282
291283 it ( 'check both options and native availability' , ( ) => {
292284 ( NATIVE . isNativeAvailable as jest . Mock ) . mockImplementation ( ( ) => true ) ;
293285 init ( { enableNative : true } ) ;
294286 expect ( usedOptions ( ) ?. transport ) . toEqual ( makeNativeTransport ) ;
295- // eslint-disable-next-line @typescript-eslint/unbound-method
296287 expect ( NATIVE . isNativeAvailable ) . toBeCalled ( ) ;
297288 } ) ;
298289 } ) ;
0 commit comments