mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
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:
1 parent
567a12c758
commit
bd7de888e0
1 file changed
+7
-2
@@ -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 () => {
|
||||
|
||||
Reference in new issue
Block a user