File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/toolkit/src/query/tests Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,7 @@ describe('fetchBaseQuery', () => {
176
176
expect ( res . meta ?. response ) . toBeInstanceOf ( Object )
177
177
expect ( res . error ) . toEqual ( {
178
178
status : 'PARSING_ERROR' ,
179
- error :
180
- 'SyntaxError: Unexpected token \'h\', "this is not json!" is not valid JSON' ,
179
+ error : expect . stringMatching ( / S y n t a x E r r o r : U n e x p e c t e d t o k e n / ) ,
181
180
originalStatus : 200 ,
182
181
data : `this is not json!` ,
183
182
} )
@@ -335,8 +334,7 @@ describe('fetchBaseQuery', () => {
335
334
expect ( res . meta ?. response ) . toBeInstanceOf ( Object )
336
335
expect ( res . error ) . toEqual ( {
337
336
status : 'PARSING_ERROR' ,
338
- error :
339
- 'SyntaxError: Unexpected token \'h\', "this is not json!" is not valid JSON' ,
337
+ error : expect . stringMatching ( / S y n t a x E r r o r : U n e x p e c t e d t o k e n / ) ,
340
338
originalStatus : 500 ,
341
339
data : `this is not json!` ,
342
340
} )
You can’t perform that action at this time.
0 commit comments