This repository has been archived on 2023-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
beatsaber-helpers/__tests__/scoresaber.js
Fascinated 6daa50a77a
All checks were successful
build (15.x)
build (16.x)
build (17.x)
build (18.x)
build (19.x)
update tests
2023-03-29 20:13:55 +01:00

21 lines
651 B
JavaScript

const { ScoreSaber } = require("../dist/index");
const PREFIX = "ScoreSaber -";
const TEST_PLAYER = "76561198449412074";
test(`${PREFIX} Validate getPlayers`, async () => {
const response = await ScoreSaber.getPlayers("ImFascinated", 1, ["GB"]);
const players = response.players;
expect(players.length).toBeGreaterThan(0);
});
test(`${PREFIX} Validate getActivePlayerCount`, async () => {
const response = await ScoreSaber.getActivePlayerCount();
expect(response).toBeGreaterThan(0);
});
test(`${PREFIX} Validate getPlayer`, async () => {
const response = await ScoreSaber.getPlayer(TEST_PLAYER);
expect(response.id).toBe(TEST_PLAYER);
});