@@ -21,6 +21,7 @@ import { getMockAbortableRequest, getMockRequestHandler } from '../../../tests/m
2121import { RequestHandler } from '../../../utils/http_request_handler/http' ;
2222import { advanceTimersByTime , exhaustMicrotasks } from '../../../tests/testUtils' ;
2323import { OptimizelyError } from '../../../error/optimizly_error' ;
24+ import { CMAB_FETCH_FAILED , INVALID_CMAB_FETCH_RESPONSE } from 'error_message' ;
2425
2526const mockSuccessResponse = ( variation : string ) => Promise . resolve ( {
2627 statusCode : 200 ,
@@ -301,7 +302,7 @@ describe('DefaultCmabClient', () => {
301302 const cmabUuid = 'uuid123' ;
302303
303304 await expect ( cmabClient . fetchDecision ( ruleId , userId , attributes , cmabUuid ) ) . rejects . toMatchObject (
304- new OptimizelyError ( ' CMAB_FETCH_FAILED' , 500 ) ,
305+ new OptimizelyError ( CMAB_FETCH_FAILED , 500 ) ,
305306 ) ;
306307 } ) ;
307308
@@ -330,7 +331,7 @@ describe('DefaultCmabClient', () => {
330331 const cmabUuid = 'uuid123' ;
331332
332333 await expect ( cmabClient . fetchDecision ( ruleId , userId , attributes , cmabUuid ) ) . rejects . toMatchObject (
333- new OptimizelyError ( 'INVALID_CMAB_RESPONSE' ) ,
334+ new OptimizelyError ( INVALID_CMAB_FETCH_RESPONSE ) ,
334335 ) ;
335336 } ) ;
336337
0 commit comments