Skip to content

Commit 4c7b8f4

Browse files
committed
add pages api route e2e test
1 parent 1a073ff commit 4c7b8f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { expect, test } from "@playwright/test";
2+
3+
test("should not fail on an api route", async ({ page }) => {
4+
const result = await page.goto("/api/hello");
5+
expect(result?.status()).toBe(200);
6+
const body = await result?.json();
7+
expect(body).toEqual({ hello: "world" });
8+
});

0 commit comments

Comments
 (0)