tests(11): spec-correct hashChangeHandler default view (trending, not most-recent)

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 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-07-05 11:36:15 -04:00
1 parent 567a12c758
commit bd7de888e0
1 file changed
+7 -2
+7 -2
View File
@@ -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 () => {