Skip to content

Commit e844e84

Browse files
fix: add concepts to getEntries test assertion helpers when present []
1 parent fb3bcc2 commit e844e84

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/integration/getEntries.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ describe('getEntries via client chain modifiers', () => {
416416
'sys.id': entryWithResolvableLink,
417417
})
418418

419-
assertLocalizedEntriesResponse(response)
419+
const conceptsIncludedInMetadata = true
420+
assertLocalizedEntriesResponse(response, conceptsIncludedInMetadata)
420421
expect(response?.sys?.contentSourceMapsLookup).toBeDefined()
421422
})
422423

@@ -496,7 +497,7 @@ describe('getEntries via client chain modifiers', () => {
496497
})
497498

498499
// Assertion helpers
499-
function assertLocalizedEntriesResponse(response) {
500+
function assertLocalizedEntriesResponse(response, conceptsIncludedInMetadata = false) {
500501
expect(response.includes).toBeDefined()
501502
expect(response.includes!.Asset).toBeDefined()
502503
expect(Object.keys(response.includes!.Asset!).length).toBeGreaterThan(0)
@@ -507,7 +508,7 @@ function assertLocalizedEntriesResponse(response) {
507508
expect(entry.fields.bestFriend['en-US'].sys.type).toBe('Entry')
508509
expect(entry.metadata).toEqual({
509510
tags: [],
510-
concepts: [],
511+
...(conceptsIncludedInMetadata && { concepts: [] }),
511512
})
512513
}
513514

0 commit comments

Comments
 (0)