@@ -18,31 +18,31 @@ class MockIntegration implements Integration {
1818describe ( 'getIntegrationsToSetup' , ( ) => {
1919 it ( 'works with empty array' , ( ) => {
2020 const integrations = getIntegrationsToSetup ( {
21- integrations : [ ] ,
21+ userIntegrations : [ ] ,
2222 } ) ;
2323
2424 expect ( integrations . map ( i => i . name ) ) . toEqual ( [ ] ) ;
2525 } ) ;
2626
2727 it ( 'works with single item' , ( ) => {
2828 const integrations = getIntegrationsToSetup ( {
29- integrations : [ new MockIntegration ( 'foo' ) ] ,
29+ userIntegrations : [ new MockIntegration ( 'foo' ) ] ,
3030 } ) ;
3131
3232 expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' ] ) ;
3333 } ) ;
3434
3535 it ( 'works with multiple items' , ( ) => {
3636 const integrations = getIntegrationsToSetup ( {
37- integrations : [ new MockIntegration ( 'foo' ) , new MockIntegration ( 'bar' ) ] ,
37+ userIntegrations : [ new MockIntegration ( 'foo' ) , new MockIntegration ( 'bar' ) ] ,
3838 } ) ;
3939
4040 expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
4141 } ) ;
4242
4343 it ( 'filter duplicated items' , ( ) => {
4444 const integrations = getIntegrationsToSetup ( {
45- integrations : [ new MockIntegration ( 'foo' ) , new MockIntegration ( 'foo' ) , new MockIntegration ( 'bar' ) ] ,
45+ userIntegrations : [ new MockIntegration ( 'foo' ) , new MockIntegration ( 'foo' ) , new MockIntegration ( 'bar' ) ] ,
4646 } ) ;
4747
4848 expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
@@ -55,7 +55,7 @@ describe('getIntegrationsToSetup', () => {
5555 ( second as any ) . order = 'second' ;
5656
5757 const integrations = getIntegrationsToSetup ( {
58- integrations : [ first , second , new MockIntegration ( 'bar' ) ] ,
58+ userIntegrations : [ first , second , new MockIntegration ( 'bar' ) ] ,
5959 } ) ;
6060
6161 expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
@@ -89,7 +89,7 @@ describe('getIntegrationsToSetup', () => {
8989 it ( 'work with user integrations and defaults and pick defaults first' , ( ) => {
9090 const integrations = getIntegrationsToSetup ( {
9191 defaultIntegrations : [ new MockIntegration ( 'foo' ) ] ,
92- integrations : [ new MockIntegration ( 'bar' ) ] ,
92+ userIntegrations : [ new MockIntegration ( 'bar' ) ] ,
9393 } ) ;
9494
9595 expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
@@ -98,7 +98,7 @@ describe('getIntegrationsToSetup', () => {
9898 it ( 'work with user integrations and defaults and filter duplicates' , ( ) => {
9999 const integrations = getIntegrationsToSetup ( {
100100 defaultIntegrations : [ new MockIntegration ( 'foo' ) , new MockIntegration ( 'foo' ) ] ,
101- integrations : [ new MockIntegration ( 'bar' ) , new MockIntegration ( 'bar' ) ] ,
101+ userIntegrations : [ new MockIntegration ( 'bar' ) , new MockIntegration ( 'bar' ) ] ,
102102 } ) ;
103103
104104 expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
@@ -116,34 +116,11 @@ describe('getIntegrationsToSetup', () => {
116116
117117 const integrations = getIntegrationsToSetup ( {
118118 defaultIntegrations : [ firstDefault , secondDefault ] ,
119- integrations : [ firstUser , secondUser ] ,
119+ userIntegrations : [ firstUser , secondUser ] ,
120120 } ) ;
121121
122122 expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
123123 expect ( ( integrations [ 0 ] as any ) . order ) . toEqual ( 'firstUser' ) ;
124124 expect ( ( integrations [ 1 ] as any ) . order ) . toEqual ( 'secondUser' ) ;
125125 } ) ;
126-
127- it ( 'always moves Debug integration to the end of the list' , ( ) => {
128- let integrations = getIntegrationsToSetup ( {
129- defaultIntegrations : [ new MockIntegration ( 'Debug' ) , new MockIntegration ( 'foo' ) ] ,
130- integrations : [ new MockIntegration ( 'bar' ) ] ,
131- } ) ;
132-
133- expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' , 'Debug' ] ) ;
134-
135- integrations = getIntegrationsToSetup ( {
136- defaultIntegrations : [ new MockIntegration ( 'foo' ) ] ,
137- integrations : [ new MockIntegration ( 'Debug' ) , new MockIntegration ( 'bar' ) ] ,
138- } ) ;
139-
140- expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' , 'Debug' ] ) ;
141-
142- integrations = getIntegrationsToSetup ( {
143- defaultIntegrations : [ new MockIntegration ( 'Debug' ) ] ,
144- integrations : [ new MockIntegration ( 'foo' ) ] ,
145- } ) ;
146-
147- expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'Debug' ] ) ;
148- } ) ;
149126} ) ;
0 commit comments