Skip to content

Commit 378bd9f

Browse files
committed
docs(readme): update
1 parent a678bf1 commit 378bd9f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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

184185
await 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
);

0 commit comments

Comments
 (0)