diff --git a/frontend/tests/unit/test_app_js_grade_date.py b/frontend/tests/unit/test_app_js_grade_date.py index 0687c5d..e27fd6c 100644 --- a/frontend/tests/unit/test_app_js_grade_date.py +++ b/frontend/tests/unit/test_app_js_grade_date.py @@ -6,16 +6,14 @@ midnight for any viewer east of UTC. Reported from Kaunas (UTC+3): asking for the Weekly tab on 7/26 rendered 7/25. There is no JS/DOM test harness in this repo to drive app.js and assert on the -real fetch() URL it builds: static/package.json declares zero dependencies (no -jest/playwright/node test runner), no such runner is wired into scripts/test.sh -or any workflow, and server/**/*_test.go (the Go suite CI actually gates on) -covers the Go SSR layer only, never static/*.js's runtime behavior. So this -can't be a behavioral test. What it CAN do, hermetically, through the same -served-asset route test_pages.py already exercises (`GET {B}/app.js`), is treat -the real shipped source as data and assert the structural property the fix -guarantees: runGrade() builds exactly one grade URL and always includes an -explicit `date=`, rather than branching on whether the selected date is "today" -and omitting it in that case. +real fetch() URL it builds -- static/package.json declares zero dependencies, so +there is no jest/playwright/node runner wired into CI, and nothing else covers +static/*.js runtime behavior. So this can't be a behavioral test. What it CAN +do, hermetically, through the same served-asset route test_pages.py already +exercises (`GET {B}/app.js`), is treat the real shipped source as data and +assert the structural property the fix guarantees: runGrade() builds exactly one +grade URL and always includes an explicit `date=`, rather than branching on +whether the selected date is "today" and omitting it in that case. This fails against the pre-fix source and passes against the fixed source -- a source guard, not a substitute for a real behavioral test.