@@ -334,7 +334,7 @@ describe('getEntries via client chain modifiers', () => {
334
334
include : 5 ,
335
335
'sys.id' : entryWithResolvableLink ,
336
336
} )
337
- assertLocalizedEntriesResponse ( response , true )
337
+ assertLocalizedEntriesResponse ( response )
338
338
} )
339
339
340
340
test ( 'previewClient.withAllLocales' , async ( ) => {
@@ -343,7 +343,7 @@ describe('getEntries via client chain modifiers', () => {
343
343
'sys.id' : entryWithResolvableLink ,
344
344
} )
345
345
346
- assertLocalizedEntriesResponse ( response , true )
346
+ assertLocalizedEntriesResponse ( response )
347
347
} )
348
348
349
349
test ( 'client.withAllLocales.withoutLinkResolution' , async ( ) => {
@@ -396,8 +396,7 @@ describe('getEntries via client chain modifiers', () => {
396
396
'sys.id' : entryWithResolvableLink ,
397
397
} )
398
398
399
- const conceptsIncludedInMetadata = true
400
- assertCSMEntriesResponse ( response , conceptsIncludedInMetadata )
399
+ assertCSMEntriesResponse ( response )
401
400
} )
402
401
403
402
test ( 'enforces entry.sys when query.select is defined' , async ( ) => {
@@ -416,8 +415,7 @@ describe('getEntries via client chain modifiers', () => {
416
415
'sys.id' : entryWithResolvableLink ,
417
416
} )
418
417
419
- const conceptsIncludedInMetadata = true
420
- assertLocalizedEntriesResponse ( response , conceptsIncludedInMetadata )
418
+ assertLocalizedEntriesResponse ( response )
421
419
expect ( response ?. sys ?. contentSourceMapsLookup ) . toBeDefined ( )
422
420
} )
423
421
@@ -497,7 +495,7 @@ describe('getEntries via client chain modifiers', () => {
497
495
} )
498
496
499
497
// Assertion helpers
500
- function assertLocalizedEntriesResponse ( response , conceptsIncludedInMetadata = false ) {
498
+ function assertLocalizedEntriesResponse ( response ) {
501
499
expect ( response . includes ) . toBeDefined ( )
502
500
expect ( response . includes ! . Asset ) . toBeDefined ( )
503
501
expect ( Object . keys ( response . includes ! . Asset ! ) . length ) . toBeGreaterThan ( 0 )
@@ -508,11 +506,11 @@ function assertLocalizedEntriesResponse(response, conceptsIncludedInMetadata = f
508
506
expect ( entry . fields . bestFriend [ 'en-US' ] . sys . type ) . toBe ( 'Entry' )
509
507
expect ( entry . metadata ) . toEqual ( {
510
508
tags : [ ] ,
511
- ... ( conceptsIncludedInMetadata && { concepts : [ ] } ) ,
509
+ concepts : [ ] ,
512
510
} )
513
511
}
514
512
515
- function assertCSMEntriesResponse ( response , conceptsIncludedInMetadata = false ) {
513
+ function assertCSMEntriesResponse ( response ) {
516
514
expect ( response . includes ) . toBeDefined ( )
517
515
expect ( response . includes ! . Asset ) . toBeDefined ( )
518
516
expect ( Object . keys ( response . includes ! . Asset ! ) . length ) . toBeGreaterThan ( 0 )
@@ -524,7 +522,7 @@ function assertCSMEntriesResponse(response, conceptsIncludedInMetadata = false)
524
522
525
523
expect ( entry . metadata ) . toEqual ( {
526
524
tags : [ ] ,
527
- ... ( conceptsIncludedInMetadata && { concepts : [ ] } ) ,
525
+ concepts : [ ] ,
528
526
} )
529
527
expect ( response . sys ?. contentSourceMapsLookup ) . toBeDefined ( )
530
528
}
0 commit comments