File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,11 +77,11 @@ export const generateMSW = (
77
77
const isReturnHttpResponse = value && value !== 'undefined' ;
78
78
79
79
const returnType = response . definition . success ;
80
- const functionName = `get${ pascal ( operationId ) } Mock ` ;
80
+ const getResponseMockFunctionName = `get${ pascal ( operationId ) } ResponseMock ` ;
81
81
const handlerName = `get${ pascal ( operationId ) } MockHandler` ;
82
82
83
83
const mockImplementation = isReturnHttpResponse
84
- ? `export const ${ functionName } = (${ isResponseOverridable ? `overrideResponse: any = {}` : '' } ): ${ returnType } => (${ value } )\n\n`
84
+ ? `export const ${ getResponseMockFunctionName } = (${ isResponseOverridable ? `overrideResponse: any = {}` : '' } ): ${ returnType } => (${ value } )\n\n`
85
85
: '' ;
86
86
87
87
const handlerImplementation = `
@@ -91,8 +91,8 @@ export const ${handlerName} = (${isReturnHttpResponse && !isTextPlain ? `overrid
91
91
return new HttpResponse(${
92
92
isReturnHttpResponse
93
93
? isTextPlain
94
- ? `${ functionName } ()`
95
- : `JSON.stringify(overrideResponse ? overrideResponse : ${ functionName } ())`
94
+ ? `${ getResponseMockFunctionName } ()`
95
+ : `JSON.stringify(overrideResponse ? overrideResponse : ${ getResponseMockFunctionName } ())`
96
96
: null
97
97
} ,
98
98
{
You can’t perform that action at this time.
0 commit comments