33 assert ,
44 HOST ,
55 MASTER_KEY ,
6- ObjectKeys ,
6+ objectKeys ,
77} from "./utils/meilisearch-test-utils.js" ;
88import { type Film , FILMS } from "./utils/test-data/films.js" ;
99import type {
@@ -31,7 +31,6 @@ import {
3131} from "./utils/search.js" ;
3232
3333beforeAll ( async ( ) => {
34- // TODO: If this disables the rest of the experimental features, that might be a problem, consider https://vitest.dev/config/#globalsetup
3534 await client . updateExperimentalFeatures ( { network : true } ) ;
3635 await client . updateNetwork ( {
3736 self : INDEX_UID ,
@@ -56,28 +55,20 @@ beforeAll(async () => {
5655 } ,
5756 } )
5857 . waitTask ( )
59- . then ( ( { status, error } ) => {
60- assert . isNull ( error ) ;
61- assert . strictEqual ( status , "succeeded" ) ;
58+ . then ( ( task ) => {
59+ assert . isTaskSuccessful ( task ) ;
6260 } ) ;
6361
6462 await index
6563 . addDocuments ( FILMS )
6664 . waitTask ( )
67- . then ( ( { status, error } ) => {
68- assert . isNull ( error ) ;
69- assert . strictEqual ( status , "succeeded" ) ;
65+ . then ( ( task ) => {
66+ assert . isTaskSuccessful ( task ) ;
7067 } ) ;
7168} ) ;
7269
7370afterAll ( async ( ) => {
74- await index
75- . delete ( )
76- . waitTask ( )
77- . then ( ( { status, error } ) => {
78- assert . isNull ( error ) ;
79- assert . strictEqual ( status , "succeeded" ) ;
80- } ) ;
71+ await index . delete ( ) . waitTask ( ) ;
8172 await client . updateNetwork ( { } ) ;
8273} ) ;
8374
@@ -296,7 +287,7 @@ describe.concurrent("`showMatchesPosition` param", () => {
296287 ) ;
297288} ) ;
298289
299- const possibleMatchingStrategies = ObjectKeys < MatchingStrategy > ( {
290+ const possibleMatchingStrategies = objectKeys < MatchingStrategy > ( {
300291 last : null ,
301292 all : null ,
302293 frequency : null ,
@@ -324,7 +315,6 @@ describe.concurrent.for(possibleMatchingStrategies)(
324315 } ,
325316) ;
326317
327- // TODO: Another filter with geo filtering
328318const filterExpressions : [ name : string , filter : FilterExpression ] [ ] = [
329319 [ "string" , `release_date < ${ Date . parse ( "1998-01-01" ) } AND id = 607` ] ,
330320 [ "array" , [ [ `release_date < ${ Date . parse ( "1998-01-01" ) } ` ] , [ "id = 607" ] ] ] ,
0 commit comments