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

21 lines
651 B
JavaScript
Raw Normal View History

2023-03-29 19:13:55 +00:00
const { ScoreSaber } = require("../dist/index");
2023-03-29 17:33:44 +00:00
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);
});