@@ -471,11 +471,11 @@ describe('<CourseOutline />', () => {
471471 const dummyBtn = await screen . findByRole ( 'button' , { name : 'Dummy button' } ) ;
472472 fireEvent . click ( dummyBtn ) ;
473473
474- waitFor ( ( ) => expect ( axiosMock . history . post . length ) . toBe ( 3 ) ) ;
474+ await waitFor ( ( ) => expect ( axiosMock . history . post . length ) . toBe ( 3 ) ) ;
475475
476476 const [ section ] = courseOutlineIndexMock . courseStructure . childInfo . children ;
477477 const [ subsection ] = section . childInfo . children ;
478- waitFor ( ( ) => {
478+ await waitFor ( ( ) => {
479479 expect ( axiosMock . history . post [ 2 ] . data ) . toBe ( JSON . stringify ( {
480480 type : COMPONENT_TYPES . libraryV2 ,
481481 category : 'vertical' ,
@@ -509,10 +509,10 @@ describe('<CourseOutline />', () => {
509509 const dummyBtn = await screen . findByRole ( 'button' , { name : 'Dummy button' } ) ;
510510 fireEvent . click ( dummyBtn ) ;
511511
512- waitFor ( ( ) => expect ( axiosMock . history . post . length ) . toBe ( 3 ) ) ;
512+ await waitFor ( ( ) => expect ( axiosMock . history . post . length ) . toBe ( 3 ) ) ;
513513
514514 const [ section ] = courseOutlineIndexMock . courseStructure . childInfo . children ;
515- waitFor ( ( ) => {
515+ await waitFor ( ( ) => {
516516 expect ( axiosMock . history . post [ 2 ] . data ) . toBe ( JSON . stringify ( {
517517 type : COMPONENT_TYPES . libraryV2 ,
518518 category : 'sequential' ,
@@ -545,10 +545,10 @@ describe('<CourseOutline />', () => {
545545 const dummyBtn = await screen . findByRole ( 'button' , { name : 'Dummy button' } ) ;
546546 fireEvent . click ( dummyBtn ) ;
547547
548- waitFor ( ( ) => expect ( axiosMock . history . post . length ) . toBe ( 3 ) ) ;
548+ await waitFor ( ( ) => expect ( axiosMock . history . post . length ) . toBe ( 3 ) ) ;
549549
550550 const courseUsageKey = courseOutlineIndexMock . courseStructure . id ;
551- waitFor ( ( ) => {
551+ await waitFor ( ( ) => {
552552 expect ( axiosMock . history . post [ 2 ] . data ) . toBe ( JSON . stringify ( {
553553 type : COMPONENT_TYPES . libraryV2 ,
554554 category : 'chapter' ,
0 commit comments