File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,10 @@ it("example", async () => {
7070 instructions: " Respond with a single user described by the schema." ,
7171 };
7272
73- fetchMock .get (" /user" , () =>
74- mockClient .requestMock (" /user" , " GET" , { metadata }) // add mock via mock-mcp
75- );
73+ fetchMock .get (" /user" , async () => {
74+ const response = await mockClient .requestMock (" /user" , " GET" , { metadata }) // add mock via mock-mcp
75+ return response .data
76+ });
7677
7778 const result = await fetch (" /user" );
7879 const data = await result .json ();
@@ -183,7 +184,7 @@ const mockClient = await connect({
183184
184185await page .route (" **/api/users" , async (route ) => {
185186 const url = new URL (route .request ().url ());
186- const data = await mockClient .requestMock (
187+ const { data } = await mockClient .requestMock (
187188 url .pathname ,
188189 route .request ().method ()
189190 );
You can’t perform that action at this time.
0 commit comments