@@ -470,12 +470,14 @@ const mappedSettings = {
470470
471471beforeAll ( async ( ) => {
472472 await ms . updateExperimentalFeatures ( { compositeEmbedders : true } ) ;
473+ const task = await ms . createIndex ( INDEX_UID ) . waitTask ( ) ;
474+ assert . isTaskSuccessful ( task ) ;
473475} ) ;
474476
475477afterAll ( async ( ) => {
476- await ms . updateExperimentalFeatures ( { compositeEmbedders : false } ) ;
477478 const task = await index . delete ( ) . waitTask ( ) ;
478479 assert . isTaskSuccessful ( task ) ;
480+ await ms . updateExperimentalFeatures ( { compositeEmbedders : false } ) ;
479481} ) ;
480482
481483describe . for ( Object . entries ( mappedSettings ) ) ( "%s" , ( [ key , mappedSetting ] ) => {
@@ -506,8 +508,9 @@ describe.for(Object.entries(mappedSettings))("%s", ([key, mappedSetting]) => {
506508 test . for ( mappedSetting ) (
507509 "single update and get methods%s" ,
508510 async ( [ , { input, assertion } ] ) => {
509- const task = await updateSetting ( input ) . waitTask ( ) ;
511+ const task = await updateSetting ( input ) . waitTask ( { timeout : 30_000 } ) ;
510512 assert . isTaskSuccessful ( task ) ;
513+ assert . strictEqual ( task . type , "settingsUpdate" ) ;
511514
512515 const taskSetting = task . details ?. [ castKey ] ;
513516 assert . isDefined ( taskSetting ) ;
@@ -522,13 +525,17 @@ describe.for(Object.entries(mappedSettings))("%s", ([key, mappedSetting]) => {
522525 const task = await resetSetting ( ) . waitTask ( ) ;
523526 assert . includeDeepMembers ( [ null , [ "*" ] ] , [ task . details ?. [ castKey ] ] ) ;
524527 assert . isTaskSuccessful ( task ) ;
528+ assert . strictEqual ( task . type , "settingsUpdate" ) ;
525529 } ) ;
526530
527531 test . for ( mappedSetting ) (
528532 `${ index . updateSettings . name } and ${ index . getSettings . name } methods%s` ,
529533 async ( [ , { input, assertion } ] ) => {
530- const task = await index . updateSettings ( { [ castKey ] : input } ) . waitTask ( ) ;
534+ const task = await index
535+ . updateSettings ( { [ castKey ] : input } )
536+ . waitTask ( { timeout : 30_000 } ) ;
531537 assert . isTaskSuccessful ( task ) ;
538+ assert . strictEqual ( task . type , "settingsUpdate" ) ;
532539
533540 const taskSetting = task . details ?. [ castKey ] ;
534541 assert . isDefined ( taskSetting ) ;
@@ -544,11 +551,13 @@ describe.for(Object.entries(mappedSettings))("%s", ([key, mappedSetting]) => {
544551 const task = await index . updateSettings ( { [ castKey ] : null } ) . waitTask ( ) ;
545552 assert . includeDeepMembers ( [ null , [ "*" ] ] , [ task . details ?. [ castKey ] ] ) ;
546553 assert . isTaskSuccessful ( task ) ;
554+ assert . strictEqual ( task . type , "settingsUpdate" ) ;
547555 } ) ;
548556} ) ;
549557
550558test ( `${ index . resetSettings . name } method` , async ( ) => {
551559 const task = await index . resetSettings ( ) . waitTask ( ) ;
560+
552561 assert . isTaskSuccessful ( task ) ;
553562 assert . deepEqual ( task . details , {
554563 dictionary : null ,
@@ -572,4 +581,5 @@ test(`${index.resetSettings.name} method`, async () => {
572581 synonyms : null ,
573582 typoTolerance : null ,
574583 } satisfies Required < UpdatableSettings > ) ;
584+ assert . strictEqual ( task . type , "settingsUpdate" ) ;
575585} ) ;
0 commit comments