From bd7de888e0fd759923be49e4344fb4e7300025cf Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 5 Jul 2026 11:36:15 -0400 Subject: [PATCH] tests(11): spec-correct hashChangeHandler default view (trending, not most-recent) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/unit/hashChangeHandler.test.mjs asserted the logged-out default view was views/most-recent-videos.html. Commit 04621efc (2026-06-24, "Trending defaults") made TRENDING the deliberate logged-out landing (FEATURE_TRENDING_FEED defaults on; hashChangeHandler.js:95-99 → logged out = TRENDING, else RECENT). This is the SAME stale spec the sibling tests/app/hash-change-handler.test.mjs was already corrected for — this second file was missed. Equally-strict spec_correction: assert views/trending.html. Verified: # pass 4 # fail 0. Co-Authored-By: Claude Opus 4.8 --- tests/unit/hashChangeHandler.test.mjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/unit/hashChangeHandler.test.mjs b/tests/unit/hashChangeHandler.test.mjs index 277d2ad8..ca48a5ba 100644 --- a/tests/unit/hashChangeHandler.test.mjs +++ b/tests/unit/hashChangeHandler.test.mjs @@ -36,8 +36,13 @@ test('createHashChangeHandler', async (t) => { loadedView = null; mockLocation.hash = ''; await handler(); - // Default is most-recent-videos if not logged in - assert.equal(loadedView, 'views/most-recent-videos.html'); + // spec_correction (todo-11): commit 04621efc (2026-06-24, "Trending defaults") + // made TRENDING the deliberate logged-out landing (FEATURE_TRENDING_FEED + // defaults on; hashChangeHandler.js:95-99). This test still expected the OLD + // default (most-recent-videos) — the same stale spec the sibling + // tests/app/hash-change-handler.test.mjs was already corrected for. Equally + // strict: the correct observable outcome is views/trending.html. + assert.equal(loadedView, 'views/trending.html'); }); await t.test('redirects legacy view', async () => {