From 7746807d9f1358916ccc360e2e0e10cd936136a6 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Thu, 9 Mar 2023 16:20:19 +0100 Subject: [PATCH] docs(api-testing): fix broken snippet (#21499) Fixes https://github.com/microsoft/playwright/issues/21476 --- docs/src/test-api-testing-js.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/test-api-testing-js.md b/docs/src/test-api-testing-js.md index 24c12ca120..b52c04b314 100644 --- a/docs/src/test-api-testing-js.md +++ b/docs/src/test-api-testing-js.md @@ -308,7 +308,7 @@ test('last created issue should be on the server', async ({ page, request }) => const newIssue = await request.get(`https://api.github.com/repos/${USER}/${REPO}/issues/${issueId}`); expect(newIssue.ok()).toBeTruthy(); - expect(newIssue).toEqual(expect.objectContaining({ + expect(newIssue.json()).toEqual(expect.objectContaining({ title: 'Bug report 1' })); }); @@ -353,7 +353,7 @@ test('last created issue should be on the server', async ({ page, request }) => const newIssue = await request.get(`https://api.github.com/repos/${USER}/${REPO}/issues/${issueId}`); expect(newIssue.ok()).toBeTruthy(); - expect(newIssue).toEqual(expect.objectContaining({ + expect(newIssue.json()).toEqual(expect.objectContaining({ title: 'Bug report 1' })); });