Skip to content

Commit 5e0ce64

Browse files
feat: [GROOT-1484] Update tests
1 parent f23fca7 commit 5e0ce64

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

test/integration/getEntries.test.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ describe('getEntries via client chain modifiers', () => {
334334
include: 5,
335335
'sys.id': entryWithResolvableLink,
336336
})
337-
assertLocalizedEntriesResponse(response, true)
337+
assertLocalizedEntriesResponse(response)
338338
})
339339

340340
test('previewClient.withAllLocales', async () => {
@@ -343,7 +343,7 @@ describe('getEntries via client chain modifiers', () => {
343343
'sys.id': entryWithResolvableLink,
344344
})
345345

346-
assertLocalizedEntriesResponse(response, true)
346+
assertLocalizedEntriesResponse(response)
347347
})
348348

349349
test('client.withAllLocales.withoutLinkResolution', async () => {
@@ -396,8 +396,7 @@ describe('getEntries via client chain modifiers', () => {
396396
'sys.id': entryWithResolvableLink,
397397
})
398398

399-
const conceptsIncludedInMetadata = true
400-
assertCSMEntriesResponse(response, conceptsIncludedInMetadata)
399+
assertCSMEntriesResponse(response)
401400
})
402401

403402
test('enforces entry.sys when query.select is defined', async () => {
@@ -416,8 +415,7 @@ describe('getEntries via client chain modifiers', () => {
416415
'sys.id': entryWithResolvableLink,
417416
})
418417

419-
const conceptsIncludedInMetadata = true
420-
assertLocalizedEntriesResponse(response, conceptsIncludedInMetadata)
418+
assertLocalizedEntriesResponse(response)
421419
expect(response?.sys?.contentSourceMapsLookup).toBeDefined()
422420
})
423421

@@ -497,7 +495,7 @@ describe('getEntries via client chain modifiers', () => {
497495
})
498496

499497
// Assertion helpers
500-
function assertLocalizedEntriesResponse(response, conceptsIncludedInMetadata = false) {
498+
function assertLocalizedEntriesResponse(response) {
501499
expect(response.includes).toBeDefined()
502500
expect(response.includes!.Asset).toBeDefined()
503501
expect(Object.keys(response.includes!.Asset!).length).toBeGreaterThan(0)
@@ -508,11 +506,11 @@ function assertLocalizedEntriesResponse(response, conceptsIncludedInMetadata = f
508506
expect(entry.fields.bestFriend['en-US'].sys.type).toBe('Entry')
509507
expect(entry.metadata).toEqual({
510508
tags: [],
511-
...(conceptsIncludedInMetadata && { concepts: [] }),
509+
concepts: [],
512510
})
513511
}
514512

515-
function assertCSMEntriesResponse(response, conceptsIncludedInMetadata = false) {
513+
function assertCSMEntriesResponse(response) {
516514
expect(response.includes).toBeDefined()
517515
expect(response.includes!.Asset).toBeDefined()
518516
expect(Object.keys(response.includes!.Asset!).length).toBeGreaterThan(0)
@@ -524,7 +522,7 @@ function assertCSMEntriesResponse(response, conceptsIncludedInMetadata = false)
524522

525523
expect(entry.metadata).toEqual({
526524
tags: [],
527-
...(conceptsIncludedInMetadata && { concepts: [] }),
525+
concepts: [],
528526
})
529527
expect(response.sys?.contentSourceMapsLookup).toBeDefined()
530528
}

0 commit comments

Comments
 (0)