@@ -17,7 +17,9 @@ jest.mock('@src/data/services/lms/api');
1717jest . mock ( '@src/utils/dataTransformers' , ( ) => ( {
1818 getTransformedCourseDataObject : jest . fn ( ( courses ) => {
1919 const result = { } ;
20- ( courses || [ ] ) . forEach ( ( c , i ) => { result [ `card-${ i } ` ] = { ...c , cardId : `card-${ i } ` } ; } ) ;
20+ ( courses || [ ] ) . forEach ( ( c , i ) => {
21+ result [ `card-${ i } ` ] = { ...c , cardId : `card-${ i } ` } ;
22+ } ) ;
2123 return result ;
2224 } ) ,
2325} ) ) ;
@@ -69,7 +71,9 @@ describe('queryHooks', () => {
6971 it ( 'should fetch and return data with coursesByCardId for normal user' , async ( ) => {
7072 mockUseMasquerade . mockReturnValue ( {
7173 masqueradeUser : undefined ,
72- setMasqueradeUser ( ) : void { throw new Error ( 'Function not implemented.' ) ; } ,
74+ setMasqueradeUser ( ) : void {
75+ throw new Error ( 'Function not implemented.' ) ;
76+ } ,
7377 } ) ;
7478 const mockApiData = {
7579 courses : [ { id : 'course-1' } , { id : 'course-2' } ] ,
@@ -154,7 +158,9 @@ describe('queryHooks', () => {
154158 it ( 'should not retry on 4xx errors' , async ( ) => {
155159 mockUseMasquerade . mockReturnValue ( {
156160 masqueradeUser : null ,
157- setMasqueradeUser ( ) : void { throw new Error ( 'Function not implemented.' ) ; } ,
161+ setMasqueradeUser ( ) : void {
162+ throw new Error ( 'Function not implemented.' ) ;
163+ } ,
158164 } ) ;
159165 const error : any = new Error ( 'Forbidden' ) ;
160166 error . response = { status : 403 } ;
@@ -175,7 +181,9 @@ describe('queryHooks', () => {
175181 it ( 'should retry on 5xx errors up to 3 times' , async ( ) => {
176182 mockUseMasquerade . mockReturnValue ( {
177183 masqueradeUser : null ,
178- setMasqueradeUser ( ) : void { throw new Error ( 'Function not implemented.' ) ; } ,
184+ setMasqueradeUser ( ) : void {
185+ throw new Error ( 'Function not implemented.' ) ;
186+ } ,
179187 } ) ;
180188 const error : any = new Error ( 'Server Error' ) ;
181189 error . response = { status : 500 } ;
0 commit comments