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 7792ce5df5
All checks were successful
build (18.x)
fixes
2023-03-29 18:59:59 +01:00

21 lines
663 B
JavaScript

const ScoreSaber = require("../dist/scoresaber/ScoreSaber");
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);
});