@@ -177,7 +177,7 @@ describe.each([
177177 const health = await client . isHealthy ( )
178178 expect ( health ) . toBe ( true )
179179 await client . getOrCreateIndex ( 'test' )
180- const indexes = await client . listIndexes ( )
180+ const indexes = await client . getIndexes ( )
181181 expect ( indexes . length ) . toBe ( 1 )
182182 } )
183183
@@ -229,7 +229,7 @@ describe.each([
229229
230230 test ( `${ permission } key: get all indexes when not empty` , async ( ) => {
231231 await client . createIndex ( indexPk . uid )
232- await client . listIndexes ( ) . then ( ( response : IndexResponse [ ] ) => {
232+ await client . getIndexes ( ) . then ( ( response : IndexResponse [ ] ) => {
233233 const indexes = response . map ( ( index ) => index . uid )
234234 expect ( indexes ) . toEqual ( expect . arrayContaining ( [ indexPk . uid ] ) )
235235 expect ( indexes . length ) . toEqual ( 1 )
@@ -279,7 +279,7 @@ describe.each([
279279 await client . deleteIndex ( indexNoPk . uid ) . then ( ( response : void ) => {
280280 expect ( response ) . toBe ( undefined )
281281 } )
282- await expect ( client . listIndexes ( ) ) . resolves . toHaveLength ( 0 )
282+ await expect ( client . getIndexes ( ) ) . resolves . toHaveLength ( 0 )
283283 } )
284284
285285 test ( `${ permission } key: create index with already existing uid should fail` , async ( ) => {
@@ -311,7 +311,7 @@ describe.each([
311311 } )
312312
313313 test ( `${ permission } key: delete index if exists on index that does not exist` , async ( ) => {
314- const indexes = await client . listIndexes ( )
314+ const indexes = await client . getIndexes ( )
315315 await client
316316 . deleteIndexIfExists ( 'badIndex' )
317317 . then ( ( response : boolean ) => {
@@ -321,7 +321,7 @@ describe.each([
321321 'errorCode' ,
322322 ErrorStatusCode . INDEX_NOT_FOUND
323323 )
324- await expect ( client . listIndexes ( ) ) . resolves . toHaveLength ( indexes . length )
324+ await expect ( client . getIndexes ( ) ) . resolves . toHaveLength ( indexes . length )
325325 } )
326326
327327 test ( `${ permission } key: fetch deleted index should fail` , async ( ) => {
@@ -384,7 +384,7 @@ describe.each([{ client: publicClient, permission: 'Public' }])(
384384
385385 describe ( 'Test on indexes methods' , ( ) => {
386386 test ( `${ permission } key: try to get all indexes and be denied` , async ( ) => {
387- await expect ( client . listIndexes ( ) ) . rejects . toHaveProperty (
387+ await expect ( client . getIndexes ( ) ) . rejects . toHaveProperty (
388388 'errorCode' ,
389389 ErrorStatusCode . INVALID_TOKEN
390390 )
@@ -471,7 +471,7 @@ describe.each([{ client: anonymousClient, permission: 'No' }])(
471471
472472 describe ( 'Test on indexes methods' , ( ) => {
473473 test ( `${ permission } key: try to get all indexes and be denied` , async ( ) => {
474- await expect ( client . listIndexes ( ) ) . rejects . toHaveProperty (
474+ await expect ( client . getIndexes ( ) ) . rejects . toHaveProperty (
475475 'errorCode' ,
476476 ErrorStatusCode . MISSING_AUTHORIZATION_HEADER
477477 )
@@ -612,11 +612,11 @@ describe.each([
612612 )
613613 } )
614614
615- test ( `Test listIndexes route` , async ( ) => {
615+ test ( `Test getIndexes route` , async ( ) => {
616616 const route = `indexes`
617617 const client = new MeiliSearch ( { host } )
618618 const strippedHost = trailing ? host . slice ( 0 , - 1 ) : host
619- await expect ( client . listIndexes ( ) ) . rejects . toHaveProperty (
619+ await expect ( client . getIndexes ( ) ) . rejects . toHaveProperty (
620620 'message' ,
621621 `request to ${ strippedHost } /${ route } failed, reason: connect ECONNREFUSED ${ BAD_HOST . replace (
622622 'http://' ,
0 commit comments