From 011f05c65c51502201acf60a6dac62776512221d Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 17 Oct 2024 09:58:54 +0200 Subject: [PATCH] add test for js browser --- api-node/test/sdks.e2e-spec.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api-node/test/sdks.e2e-spec.ts b/api-node/test/sdks.e2e-spec.ts index 59d9c7172..67307d718 100644 --- a/api-node/test/sdks.e2e-spec.ts +++ b/api-node/test/sdks.e2e-spec.ts @@ -116,5 +116,23 @@ describe('SdksController (e2e)', () => { expect(latest).toEqual(pythonApiData.latest); }); }); + + it('Javascript Browser', async () => { + const sdkId = 'sentry.javascript.browser'; + + const pythonApiResponse = await fetch( + `${PYTHON_API_URL}/sdks/${sdkId}/versions`, + ); + const pythonApiData = await pythonApiResponse.json(); + + return request(app.getHttpServer()) + .get(`/sdks/${sdkId}/versions`) + .expect((r) => { + expect(r.status).toEqual(200); + const { versions, latest } = r.body; + expect(versions.sort()).toEqual(pythonApiData.versions.sort()); + expect(latest).toEqual(pythonApiData.latest); + }); + }); }); });