Skip to content

Commit 0a42c16

Browse files
committed
Fix prettier violations
1 parent 86eee40 commit 0a42c16

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/adapter/search-response-adapter/highlight-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function adaptSnippet(
104104
attributesToSnippet = attributesToSnippet.map(
105105
(attribute) => attribute.split(':')[0]
106106
) as any[]
107-
const snippetAll = attributesToSnippet.includes('*');
107+
const snippetAll = attributesToSnippet.includes('*')
108108
// formattedHit is the `_formatted` object returned by MeiliSearch.
109109
// It contains all the highlighted and croped attributes
110110
return (Object.keys(formattedHit) as any[]).reduce((result, key) => {

tests/snippets.tests.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ describe('Snippet Browser test', () => {
6363
const highlighted = response.results[0]?.hits[0]?._highlightResult
6464
const snippeted = response.results[0].hits[0]._snippetResult
6565
expect(highlighted?.id?.value).toEqual('6')
66-
expect(highlighted?.title?.value).toEqual('__ais-highlight__Judg__/ais-highlight__ment Night')
66+
expect(highlighted?.title?.value).toEqual(
67+
'__ais-highlight__Judg__/ais-highlight__ment Night'
68+
)
6769
expect(highlighted?.overview?.value).toEqual('While')
6870
expect(highlighted?.release_date?.value).toEqual('750643200')
6971
expect(snippeted?.id?.value).toEqual('6')
70-
expect(snippeted?.title?.value).toEqual('__ais-highlight__Judg__/ais-highlight__ment Night...')
72+
expect(snippeted?.title?.value).toEqual(
73+
'__ais-highlight__Judg__/ais-highlight__ment Night...'
74+
)
7175
expect(snippeted?.overview?.value).toEqual('While...')
7276
expect(snippeted?.release_date?.value).toEqual('750643200')
7377
})

0 commit comments

Comments
 (0)