From 8be87a904cd33fb9c719dfbb6997ef44c669d8f4 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 15:36:24 +0000 Subject: [PATCH] test: Read relative spec paths now that the spec ships them The synced spec's paths are relative to the server URL's /api/0, so the two tests that still looked up or compared full /api/0 paths failed and kept main red. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com> --- test/descriptions.test.ts | 2 +- test/docs.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/descriptions.test.ts b/test/descriptions.test.ts index f39cd90..ab9b350 100644 --- a/test/descriptions.test.ts +++ b/test/descriptions.test.ts @@ -22,7 +22,7 @@ describe("validator descriptions", () => { }); test("fields that wrap one schema in allOf keep their own description", () => { - const description = spec.paths["/api/0/organizations/{organization_id_or_slug}/dashboards/"] + const description = spec.paths["/organizations/{organization_id_or_slug}/dashboards/"] .post.requestBody.content["application/json"].schema.properties.permissions.description; expect(description).toEqual(expect.any(String)); expect(v.getDescription(vCreateOrganizationDashboardData.entries.body.entries.permissions.wrapped)).toBe(description); diff --git a/test/docs.test.ts b/test/docs.test.ts index fb6afb8..b9302e4 100644 --- a/test/docs.test.ts +++ b/test/docs.test.ts @@ -152,7 +152,7 @@ describe("API reference data", () => { test("covers every tag and operation the spec documents", () => { expect(tags.map(tag => tag.name)).toEqual(spec.tags.map((tag: { name: string }) => tag.name)); - expect(operations.map(operation => `${operation.method} ${API_BASE_PATH}${operation.path}`)).toEqual( + expect(operations.map(operation => `${operation.method} ${operation.path}`)).toEqual( sourceOperations.map(({ path, method }) => `${method.toUpperCase()} ${path}`), ); });