From ff8c4c70b91427cd48e29fb83f8a9b87a7a2843f Mon Sep 17 00:00:00 2001 From: ytkimirti Date: Thu, 24 Oct 2024 13:07:17 +0300 Subject: [PATCH] feat: add test and rename --- examples/nextjs/ci.test.ts | 10 ++++++++++ examples/nextjs/pages/api/{limit.ts => pages-test.ts} | 0 2 files changed, 10 insertions(+) rename examples/nextjs/pages/api/{limit.ts => pages-test.ts} (100%) diff --git a/examples/nextjs/ci.test.ts b/examples/nextjs/ci.test.ts index 0563a62..3c627d1 100644 --- a/examples/nextjs/ci.test.ts +++ b/examples/nextjs/ci.test.ts @@ -9,6 +9,16 @@ test("the server is running", async () => { console.log(`${deploymentURL}/api`); const res = await fetch(`${deploymentURL}/api`); + if (res.status !== 200) { + console.log(await res.text()); + } + expect(res.status).toEqual(200); +}, { timeout: 10000 }); + +test("the pages router example is working", async () => { + console.log(`${deploymentURL}/api`); + const res = await fetch(`${deploymentURL}/api/pages-test`); + if (res.status !== 200) { console.log(await res.text()); } diff --git a/examples/nextjs/pages/api/limit.ts b/examples/nextjs/pages/api/pages-test.ts similarity index 100% rename from examples/nextjs/pages/api/limit.ts rename to examples/nextjs/pages/api/pages-test.ts