import { describe } from "vitest"; import { it } from "../../../helpers"; import { niceBackendFetch } from "../../backend-helpers"; /* - v1: This route does not yet exist; it shows a 404 error. - v2beta1: Takes an optional query parameter 'queryParam' and displays it. If not given, it defaults to the string "n/a". - v2beta2: The query parameter is now required. - v2beta3: The query parameter is now called 'queryParamNew'. - v2beta4: The query parameter is now optional again (this is not actually a breaking change, so in a real scenario we wouldn't need a new version). */ describe("SmartRouteHandler", () => { describe("v1", () => { it("should return a 404 error", async ({ expect }) => { const response = await niceBackendFetch("/api/v1/migration-tests/smart-route-handler"); expect(response).toMatchInlineSnapshot(` NiceResponse { "status": 404, "body": deindent\` 404 — this page does not exist in Stack Auth's API. Please see the API documentation at https://docs.stack-auth.com, or visit the Stack Auth dashboard at https://app.stack-auth.com. URL: http://localhost:<$NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX>02/api/v1/migration-tests/smart-route-handler \`, "headers": Headers {