BlueGit

projects-timfalken-com meteors

Merge feature/t1249-fix-leaderboard-test: fix unit test after moving the friends fetch (t1249)

timfa Grok Bot · pushed by timfa

Authored 2026-11-16 · 1 day ago

Hash
01b168a9a055528712429a5b1eceaf6502a26e02
Pipeline
Passed
1 file changed +3 −1
test/leaderboard.test.js +3 −1
@@ -13,6 +13,7 @@ const css = fs.readFileSync(path.join(root, 'build/style.css'), 'utf8');
13 13 const main = fs.readFileSync(path.join(root, 'src/main.js'), 'utf8');
14 14 const online = fs.readFileSync(path.join(root, 'src/online.js'), 'utf8');
15 15 const api = fs.readFileSync(path.join(root, 'server/api.php'), 'utf8');
16 const boot = fs.readFileSync(path.join(root, 'server/lib/bootstrap.php'), 'utf8');
16 17 const buildSh = fs.readFileSync(path.join(root, 'src/build.sh'), 'utf8');
17 18
18 19 describe('Leaderboard wiring (t1247)', () =>
@@ -49,7 +50,8 @@ describe('Leaderboard wiring (t1247)', () =>
49 50 assert.match(main, /Avatar\.piece/);
50 51 assert.match(main, /tab === 'friends' && !loggedIn/);
51 52 assert.match(api, /action === 'leaderboard'/);
52 assert.match(api, /authRequest\('\/api\/friends'/);
53 assert.match(api, /leaderboardKnownIdentities\(/);
54 assert.match(boot, /authRequest\('\/api\/friends'/);
53 55 assert.match(buildSh, /avatar\.js/);
54 56 });
55 57
@@ -13,6 +13,7 @@ const css = fs.readFileSync(path.join(root, 'build/style.css'), 'utf8');
13const main = fs.readFileSync(path.join(root, 'src/main.js'), 'utf8');
13const main = fs.readFileSync(path.join(root, 'src/main.js'), 'utf8');
14const online = fs.readFileSync(path.join(root, 'src/online.js'), 'utf8');
14const online = fs.readFileSync(path.join(root, 'src/online.js'), 'utf8');
15const api = fs.readFileSync(path.join(root, 'server/api.php'), 'utf8');
15const api = fs.readFileSync(path.join(root, 'server/api.php'), 'utf8');
16const boot = fs.readFileSync(path.join(root, 'server/lib/bootstrap.php'), 'utf8');
16const buildSh = fs.readFileSync(path.join(root, 'src/build.sh'), 'utf8');
17const buildSh = fs.readFileSync(path.join(root, 'src/build.sh'), 'utf8');
17
18
18describe('Leaderboard wiring (t1247)', () =>
19describe('Leaderboard wiring (t1247)', () =>
@@ -49,7 +50,8 @@ describe('Leaderboard wiring (t1247)', () =>
49 assert.match(main, /Avatar\.piece/);
50 assert.match(main, /Avatar\.piece/);
50 assert.match(main, /tab === 'friends' && !loggedIn/);
51 assert.match(main, /tab === 'friends' && !loggedIn/);
51 assert.match(api, /action === 'leaderboard'/);
52 assert.match(api, /action === 'leaderboard'/);
52 assert.match(api, /authRequest\('\/api\/friends'/);
53 assert.match(api, /leaderboardKnownIdentities\(/);
54 assert.match(boot, /authRequest\('\/api\/friends'/);
53 assert.match(buildSh, /avatar\.js/);
55 assert.match(buildSh, /avatar\.js/);
54 });
56 });
55
57