step 10.16: done

This commit is contained in:
bepis
2026-10-23 06:29:17 +11:00
parent 81794c7dbd
commit a475eaf8eb
5 changed files with 179 additions and 21 deletions
+4 -3
View File
@@ -210,12 +210,13 @@ describe('leaderboard', () => {
assert.equal(body.error.code, 'VALIDATION_ERROR');
});
it('rejects request without authentication', async () => {
it('is accessible without authentication', async () => {
const res = await fetch(`${baseUrl}/api/leaderboard?type=level`);
const body = await res.json();
assert.equal(res.status, 401);
assert.equal(body.ok, false);
assert.equal(res.status, 200);
assert.equal(body.ok, true);
assert.ok(Array.isArray(body.data.entries));
});
// ─── Entry shape ──────────────────────────────────────────────────────