@@ -18,31 +18,31 @@ class MockIntegration implements Integration {
18
18
describe ( 'getIntegrationsToSetup' , ( ) => {
19
19
it ( 'works with empty array' , ( ) => {
20
20
const integrations = getIntegrationsToSetup ( {
21
- integrations : [ ] ,
21
+ userIntegrations : [ ] ,
22
22
} ) ;
23
23
24
24
expect ( integrations . map ( i => i . name ) ) . toEqual ( [ ] ) ;
25
25
} ) ;
26
26
27
27
it ( 'works with single item' , ( ) => {
28
28
const integrations = getIntegrationsToSetup ( {
29
- integrations : [ new MockIntegration ( 'foo' ) ] ,
29
+ userIntegrations : [ new MockIntegration ( 'foo' ) ] ,
30
30
} ) ;
31
31
32
32
expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' ] ) ;
33
33
} ) ;
34
34
35
35
it ( 'works with multiple items' , ( ) => {
36
36
const integrations = getIntegrationsToSetup ( {
37
- integrations : [ new MockIntegration ( 'foo' ) , new MockIntegration ( 'bar' ) ] ,
37
+ userIntegrations : [ new MockIntegration ( 'foo' ) , new MockIntegration ( 'bar' ) ] ,
38
38
} ) ;
39
39
40
40
expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
41
41
} ) ;
42
42
43
43
it ( 'filter duplicated items' , ( ) => {
44
44
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' ) ] ,
46
46
} ) ;
47
47
48
48
expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
@@ -55,7 +55,7 @@ describe('getIntegrationsToSetup', () => {
55
55
( second as any ) . order = 'second' ;
56
56
57
57
const integrations = getIntegrationsToSetup ( {
58
- integrations : [ first , second , new MockIntegration ( 'bar' ) ] ,
58
+ userIntegrations : [ first , second , new MockIntegration ( 'bar' ) ] ,
59
59
} ) ;
60
60
61
61
expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
@@ -89,7 +89,7 @@ describe('getIntegrationsToSetup', () => {
89
89
it ( 'work with user integrations and defaults and pick defaults first' , ( ) => {
90
90
const integrations = getIntegrationsToSetup ( {
91
91
defaultIntegrations : [ new MockIntegration ( 'foo' ) ] ,
92
- integrations : [ new MockIntegration ( 'bar' ) ] ,
92
+ userIntegrations : [ new MockIntegration ( 'bar' ) ] ,
93
93
} ) ;
94
94
95
95
expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
@@ -98,7 +98,7 @@ describe('getIntegrationsToSetup', () => {
98
98
it ( 'work with user integrations and defaults and filter duplicates' , ( ) => {
99
99
const integrations = getIntegrationsToSetup ( {
100
100
defaultIntegrations : [ new MockIntegration ( 'foo' ) , new MockIntegration ( 'foo' ) ] ,
101
- integrations : [ new MockIntegration ( 'bar' ) , new MockIntegration ( 'bar' ) ] ,
101
+ userIntegrations : [ new MockIntegration ( 'bar' ) , new MockIntegration ( 'bar' ) ] ,
102
102
} ) ;
103
103
104
104
expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
@@ -116,34 +116,11 @@ describe('getIntegrationsToSetup', () => {
116
116
117
117
const integrations = getIntegrationsToSetup ( {
118
118
defaultIntegrations : [ firstDefault , secondDefault ] ,
119
- integrations : [ firstUser , secondUser ] ,
119
+ userIntegrations : [ firstUser , secondUser ] ,
120
120
} ) ;
121
121
122
122
expect ( integrations . map ( i => i . name ) ) . toEqual ( [ 'foo' , 'bar' ] ) ;
123
123
expect ( ( integrations [ 0 ] as any ) . order ) . toEqual ( 'firstUser' ) ;
124
124
expect ( ( integrations [ 1 ] as any ) . order ) . toEqual ( 'secondUser' ) ;
125
125
} ) ;
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
- } ) ;
149
126
} ) ;
0 commit comments