Skip to content

Commit

Permalink
Fix APIRequestBuilder test not throwing
Browse files Browse the repository at this point in the history
  • Loading branch information
Rian8337 committed Feb 4, 2025
1 parent 5d907d1 commit fb03c0e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/osu-base/tests/utils/APIRequestBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,7 @@ test("Test removing parameter", () => {
});

test("Test osu! API URL builder", () => {
let builder = new OsuAPIRequestBuilder().setEndpoint("get_beatmaps");

if (!process.env.OSU_API_KEY) {
expect(() => builder.buildURL()).toThrow();
}

process.env.OSU_API_KEY = "testkey";

builder = new OsuAPIRequestBuilder().setEndpoint("get_beatmaps");
const builder = new OsuAPIRequestBuilder().setEndpoint("get_beatmaps");

expect(builder.buildURL()).toBe(osuHostname + `get_beatmaps?k=${osuKey}&`);
});

0 comments on commit fb03c0e

Please sign in to comment.