Release v0.1.7 2026-07-12
This commit is contained in:
@@ -34,12 +34,12 @@ async function json(path, init = {}) {
|
||||
return { response, body };
|
||||
}
|
||||
|
||||
function save(slotId, hunterName, bulldromeKills, highestRoguelikeRound) {
|
||||
function save(slotId, hunterName, bulldromeKills, highestRoguelikeRound, highestRogueTrialsEndlessKills) {
|
||||
return {
|
||||
schemaVersion: 5,
|
||||
slotId,
|
||||
hunterName,
|
||||
stats: { bossKills: { bulldrome: bulldromeKills }, highestRoguelikeRound },
|
||||
stats: { bossKills: { bulldrome: bulldromeKills }, highestRoguelikeRound, highestRogueTrialsEndlessKills },
|
||||
};
|
||||
}
|
||||
|
||||
@@ -62,13 +62,14 @@ test("accounts, server saves, and top-five plus current rankings work end to end
|
||||
const token = registration.body.token;
|
||||
const kills = 60 - index * 10;
|
||||
const highestRound = 30 - index * 4;
|
||||
const highestEndlessKills = 24 - index * 3;
|
||||
const upload = await json("/api/saves/1", {
|
||||
method: "PUT",
|
||||
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ save: save(1, `Hero ${index}`, kills, highestRound) }),
|
||||
body: JSON.stringify({ save: save(1, `Hero ${index}`, kills, highestRound, highestEndlessKills) }),
|
||||
});
|
||||
assert.equal(upload.response.status, 200);
|
||||
players.push({ token, kills, highestRound });
|
||||
players.push({ token, kills, highestRound, highestEndlessKills });
|
||||
}
|
||||
|
||||
const current = players[5];
|
||||
@@ -87,6 +88,15 @@ test("accounts, server saves, and top-five plus current rankings work end to end
|
||||
assert.equal(rogueBoard.body.current.rank, 6);
|
||||
assert.equal(rogueBoard.body.current.value, current.highestRound);
|
||||
|
||||
const endlessBoard = await json("/api/leaderboards/rogue-trials-endless?slot=1", {
|
||||
headers: { Authorization: `Bearer ${current.token}` },
|
||||
});
|
||||
assert.equal(endlessBoard.body.kind, "rogue-trials-endless");
|
||||
assert.equal(endlessBoard.body.top.length, 5);
|
||||
assert.equal(endlessBoard.body.top[0].value, 24);
|
||||
assert.equal(endlessBoard.body.current.rank, 6);
|
||||
assert.equal(endlessBoard.body.current.value, current.highestEndlessKills);
|
||||
|
||||
const download = await json("/api/saves/1", {
|
||||
headers: { Authorization: `Bearer ${current.token}` },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user