From d81602b064a622f029b0ef2e6504ae18db7da7ce Mon Sep 17 00:00:00 2001 From: Divyanshgupta030 <145568562+Divyanshgupta030@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:56:43 +0530 Subject: [PATCH] fix route error --- apps/api/app/api/{[...route] => [[...route]]}/route.ts | 0 apps/api/tests/hello.test.ts | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) rename apps/api/app/api/{[...route] => [[...route]]}/route.ts (100%) diff --git a/apps/api/app/api/[...route]/route.ts b/apps/api/app/api/[[...route]]/route.ts similarity index 100% rename from apps/api/app/api/[...route]/route.ts rename to apps/api/app/api/[[...route]]/route.ts diff --git a/apps/api/tests/hello.test.ts b/apps/api/tests/hello.test.ts index bb89020..26749b7 100644 --- a/apps/api/tests/hello.test.ts +++ b/apps/api/tests/hello.test.ts @@ -1,11 +1,13 @@ import { describe, it, expect, test } from "vitest"; import request from "supertest"; -import {app } from "../app/api/[...route]/route"; +import { app } from "../app/api/[[...route]]/route"; describe("Example", () => { test("GET /health", async () => { const res = await app.request("/api/health"); expect(res.status).toBe(200); - expect(await res.text()).toBe(JSON.stringify({ message: "i am alive", status: 200 })); + expect(await res.text()).toBe( + JSON.stringify({ message: "i am alive", status: 200 }) + ); }); });