21 lines
651 B
JavaScript
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);
|
|
});
|