Skip to content

Commit 92cbd07

Browse files
committed
Run linter
1 parent 943ddb6 commit 92cbd07

14 files changed

+38
-62
lines changed

packages/instant-meilisearch/__tests__/configure.attributes-to-retrieve.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ describe('Instant Meilisearch Browser test', () => {
1010
beforeAll(async () => {
1111
await meilisearchClient.deleteIndex('movies').waitTask()
1212

13-
await meilisearchClient
14-
.index('movies')
15-
.addDocuments(dataset)
16-
.waitTask()
13+
await meilisearchClient.index('movies').addDocuments(dataset).waitTask()
1714
})
1815

1916
test('attributesToRetrieve on no attributes', async () => {

packages/instant-meilisearch/__tests__/custom-http-client.test.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ describe('Custom HTTP client tests', () => {
66
beforeAll(async () => {
77
await meilisearchClient.deleteIndex('movies').waitTask()
88

9-
await meilisearchClient
10-
.index('movies')
11-
.addDocuments(dataset)
12-
.waitTask()
9+
await meilisearchClient.index('movies').addDocuments(dataset).waitTask()
1310
})
1411

1512
test('a custom HTTP client', async () => {
16-
const httpClient = vi.fn(async (url: RequestInfo | URL, init?: RequestInit) => {
17-
const result = await fetch(url, init)
18-
return await result.json()
19-
})
13+
const httpClient = vi.fn(
14+
async (url: RequestInfo | URL, init?: RequestInit) => {
15+
const result = await fetch(url, init)
16+
return await result.json()
17+
}
18+
)
2019

2120
const { searchClient } = instantMeiliSearch(
2221
'http://localhost:7700',

packages/instant-meilisearch/__tests__/facet-stats.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ describe('Facet stats tests', () => {
88
.index('movies')
99
.updateFilterableAttributes(['genres', 'release_date', 'id'])
1010
.waitTask()
11-
await meilisearchClient
12-
.index('movies')
13-
.addDocuments(dataset)
14-
.waitTask()
11+
await meilisearchClient.index('movies').addDocuments(dataset).waitTask()
1512
})
1613

1714
test('Facet stats on an empty facets array', async () => {

packages/instant-meilisearch/__tests__/facets-distribution.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ describe('Instant Meilisearch Browser test', () => {
88
.index('movies')
99
.updateFilterableAttributes(['genres'])
1010
.waitTask()
11-
await meilisearchClient
12-
.index('movies')
13-
.addDocuments(dataset)
14-
.waitTask()
11+
await meilisearchClient.index('movies').addDocuments(dataset).waitTask()
1512
})
1613

1714
test('empty array on facetDistribution', async () => {

packages/instant-meilisearch/__tests__/filter.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ describe('Instant Meilisearch Browser test', () => {
1818
'crazy_\\_"field"',
1919
])
2020
.waitTask()
21-
await meilisearchClient
22-
.index('movies')
23-
.addDocuments(dataset)
24-
.waitTask()
21+
await meilisearchClient.index('movies').addDocuments(dataset).waitTask()
2522
})
2623

2724
test('one string facet on filter without a query', async () => {

packages/instant-meilisearch/__tests__/first-facets-distribution.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { instantMeiliSearch } from '../src/index.js'
55
describe('Default facet distribution', () => {
66
beforeAll(async () => {
77
await meilisearchClient.deleteIndex('movies').waitTask()
8-
await meilisearchClient.index('movies').updateSettings({
9-
filterableAttributes: ['genres', 'release_date'],
10-
sortableAttributes: ['release_date'],
11-
}).waitTask()
128
await meilisearchClient
139
.index('movies')
14-
.addDocuments(dataset)
10+
.updateSettings({
11+
filterableAttributes: ['genres', 'release_date'],
12+
sortableAttributes: ['release_date'],
13+
})
1514
.waitTask()
15+
await meilisearchClient.index('movies').addDocuments(dataset).waitTask()
1616
})
1717

1818
// Without facets

packages/instant-meilisearch/__tests__/geosearch.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ describe('Instant Meilisearch Browser test', () => {
1313
.index('geotest')
1414
.updateFilterableAttributes(['_geo'])
1515
.waitTask()
16-
await meilisearchClient.index('geotest').updateSortableAttributes(['_geo']).waitTask()
1716
await meilisearchClient
1817
.index('geotest')
19-
.addDocuments(geoDataset)
18+
.updateSortableAttributes(['_geo'])
2019
.waitTask()
20+
await meilisearchClient.index('geotest').addDocuments(geoDataset).waitTask()
2121
})
2222

2323
test('aroundRadius and aroundLatLng in geo search', async () => {

packages/instant-meilisearch/__tests__/highlight.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ describe('Highlight Browser test', () => {
1313
.index('movies')
1414
.updateFilterableAttributes(['genres'])
1515
.waitTask()
16-
await meilisearchClient
17-
.index('movies')
18-
.addDocuments(dataset)
19-
.waitTask()
16+
await meilisearchClient.index('movies').addDocuments(dataset).waitTask()
2017
})
2118

2219
test('one attributesToHighlight on wrong attribute placeholder', async () => {

packages/instant-meilisearch/__tests__/multi-index-search.test.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ describe('Multi-index search test', () => {
1212
await moviesIndex.delete()
1313
await gamesIndex.delete()
1414

15-
await moviesIndex.updateSettings({
16-
filterableAttributes: ['genres', 'color', 'platforms'],
17-
}).waitTask()
18-
await gamesIndex.updateSettings({
19-
filterableAttributes: ['genres', 'color', 'platforms'],
20-
}).waitTask()
15+
await moviesIndex
16+
.updateSettings({
17+
filterableAttributes: ['genres', 'color', 'platforms'],
18+
})
19+
.waitTask()
20+
await gamesIndex
21+
.updateSettings({
22+
filterableAttributes: ['genres', 'color', 'platforms'],
23+
})
24+
.waitTask()
2125

2226
await moviesIndex.addDocuments(movies).waitTask()
2327
await gamesIndex.addDocuments(games).waitTask()

packages/instant-meilisearch/__tests__/overridden-meilisearch-parameters.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import { dataset, meilisearchClient, type Movies } from './assets/utils.js'
55
describe('InstantMeiliSearch overridden parameters', () => {
66
beforeAll(async () => {
77
await meilisearchClient.deleteIndex('movies').waitTask()
8-
await meilisearchClient
9-
.index('movies')
10-
.addDocuments(dataset)
11-
.waitTask()
8+
await meilisearchClient.index('movies').addDocuments(dataset).waitTask()
129
})
1310

1411
test('instantiating with, and changing overridden Meilisearch parameters', async () => {

0 commit comments

Comments
 (0)