@@ -61,8 +61,8 @@ describe('init', () => {
61
61
62
62
init ( options ) ;
63
63
64
- expect ( ( DEFAULT_INTEGRATIONS [ 0 ] . setupOnce as jest . Mock ) . mock . calls . length ) . toBe ( 1 ) ;
65
- expect ( ( DEFAULT_INTEGRATIONS [ 1 ] . setupOnce as jest . Mock ) . mock . calls . length ) . toBe ( 1 ) ;
64
+ expect ( DEFAULT_INTEGRATIONS [ 0 ] . setupOnce as jest . Mock ) . toHaveBeenCalledTimes ( 1 ) ;
65
+ expect ( DEFAULT_INTEGRATIONS [ 1 ] . setupOnce as jest . Mock ) . toHaveBeenCalledTimes ( 1 ) ;
66
66
} ) ;
67
67
68
68
test ( "doesn't install default integrations if told not to" , ( ) => {
@@ -73,20 +73,17 @@ describe('init', () => {
73
73
const options = getDefaultBrowserOptions ( { dsn : PUBLIC_DSN , defaultIntegrations : false } ) ;
74
74
init ( options ) ;
75
75
76
- expect ( ( DEFAULT_INTEGRATIONS [ 0 ] . setupOnce as jest . Mock ) . mock . calls . length ) . toBe ( 0 ) ;
77
- expect ( ( DEFAULT_INTEGRATIONS [ 1 ] . setupOnce as jest . Mock ) . mock . calls . length ) . toBe ( 0 ) ;
76
+ expect ( DEFAULT_INTEGRATIONS [ 0 ] . setupOnce as jest . Mock ) . toHaveBeenCalledTimes ( 0 ) ;
77
+ expect ( DEFAULT_INTEGRATIONS [ 1 ] . setupOnce as jest . Mock ) . toHaveBeenCalledTimes ( 0 ) ;
78
78
} ) ;
79
79
80
80
it ( 'installs merged default integrations, with overrides provided through options' , ( ) => {
81
- const DEFAULT_INTEGRATIONS : Integration [ ] = [
81
+ const DEFAULT_INTEGRATIONS = [
82
82
new MockIntegration ( 'MockIntegration 1.1' ) ,
83
83
new MockIntegration ( 'MockIntegration 1.2' ) ,
84
84
] ;
85
85
86
- const integrations : Integration [ ] = [
87
- new MockIntegration ( 'MockIntegration 1.1' ) ,
88
- new MockIntegration ( 'MockIntegration 1.3' ) ,
89
- ] ;
86
+ const integrations = [ new MockIntegration ( 'MockIntegration 1.1' ) , new MockIntegration ( 'MockIntegration 1.3' ) ] ;
90
87
const options = getDefaultBrowserOptions ( {
91
88
dsn : PUBLIC_DSN ,
92
89
defaultIntegrations : DEFAULT_INTEGRATIONS ,
@@ -102,7 +99,7 @@ describe('init', () => {
102
99
} ) ;
103
100
104
101
it ( 'installs integrations returned from a callback function' , ( ) => {
105
- const DEFAULT_INTEGRATIONS : Integration [ ] = [
102
+ const DEFAULT_INTEGRATIONS = [
106
103
new MockIntegration ( 'MockIntegration 2.1' ) ,
107
104
new MockIntegration ( 'MockIntegration 2.2' ) ,
108
105
] ;
0 commit comments