@@ -201,7 +201,7 @@ describe('Saved Objects Mixin', () => {
201
201
202
202
it ( 'should return all but hidden types' , async ( ) => {
203
203
expect ( service ) . toBeDefined ( ) ;
204
- expect ( service . types ) . toEqual ( [ 'config' , ' testtype', 'doc1' , 'doc2' ] ) ;
204
+ expect ( service . types ) . toEqual ( [ 'testtype' , 'doc1' , 'doc2' ] ) ;
205
205
} ) ;
206
206
207
207
const mockCallEs = jest . fn ( ) ;
@@ -215,30 +215,20 @@ describe('Saved Objects Mixin', () => {
215
215
it ( 'should create a repository without hidden types' , ( ) => {
216
216
const repository = service . getSavedObjectsRepository ( mockCallEs ) ;
217
217
expect ( repository ) . toBeDefined ( ) ;
218
- expect ( repository . _allowedTypes ) . toEqual ( [ 'config' , ' testtype', 'doc1' , 'doc2' ] ) ;
218
+ expect ( repository . _allowedTypes ) . toEqual ( [ 'testtype' , 'doc1' , 'doc2' ] ) ;
219
219
} ) ;
220
220
221
221
it ( 'should create a repository with a unique list of allowed types' , ( ) => {
222
- const repository = service . getSavedObjectsRepository ( mockCallEs , [
223
- 'config' ,
224
- 'config' ,
225
- 'config' ,
226
- ] ) ;
227
- expect ( repository . _allowedTypes ) . toEqual ( [ 'config' , 'testtype' , 'doc1' , 'doc2' ] ) ;
222
+ const repository = service . getSavedObjectsRepository ( mockCallEs , [ 'doc1' , 'doc1' , 'doc1' ] ) ;
223
+ expect ( repository . _allowedTypes ) . toEqual ( [ 'testtype' , 'doc1' , 'doc2' ] ) ;
228
224
} ) ;
229
225
230
226
it ( 'should create a repository with extraTypes minus duplicate' , ( ) => {
231
227
const repository = service . getSavedObjectsRepository ( mockCallEs , [
232
228
'hiddentype' ,
233
229
'hiddentype' ,
234
230
] ) ;
235
- expect ( repository . _allowedTypes ) . toEqual ( [
236
- 'config' ,
237
- 'testtype' ,
238
- 'doc1' ,
239
- 'doc2' ,
240
- 'hiddentype' ,
241
- ] ) ;
231
+ expect ( repository . _allowedTypes ) . toEqual ( [ 'testtype' , 'doc1' , 'doc2' , 'hiddentype' ] ) ;
242
232
} ) ;
243
233
244
234
it ( 'should not allow a repository without a callCluster function' , ( ) => {
0 commit comments