File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
redisinsight/ui/src/slices/tests/app Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import {
2424 getFeatureFlags ,
2525 getFeatureFlagsFailure ,
2626 getFeatureFlagsSuccess ,
27- setFeaturesToHighlight ,
2827} from 'uiSrc/slices/app/features'
2928import { getConfig } from 'uiSrc/config'
3029import {
@@ -157,15 +156,10 @@ describe('init slice', () => {
157156 it ( 'failed to init csrf' , async ( ) => {
158157 riConfig . api . csrfEndpoint = 'csrf'
159158 mswServer . use (
160- http . get < any , CSRFTokenResponse > (
159+ http . get < any , CSRFTokenResponse | { message : string } > (
161160 getMswURL ( riConfig . api . csrfEndpoint ) ,
162161 async ( ) => {
163- return HttpResponse . json (
164- {
165- message : 'Network Error' ,
166- } ,
167- { status : 500 } ,
168- )
162+ return HttpResponse . text ( '' , { status : 500 } )
169163 } ,
170164 ) ,
171165 )
@@ -177,7 +171,7 @@ describe('init slice', () => {
177171 const expectedActions = [
178172 initializeAppState ( ) ,
179173 fetchCsrfToken ( ) ,
180- fetchCsrfTokenFail ( { error : 'Network Error ' } ) ,
174+ fetchCsrfTokenFail ( { error : 'Request failed with status code 500 ' } ) ,
181175 initializeAppStateFail ( { error : FAILED_TO_FETCH_CSRF_TOKEN_ERROR } ) ,
182176 ]
183177
You can’t perform that action at this time.
0 commit comments