Skip to content

Keep realtime stats test in sync with snapshot - #4

Open
UfukNode wants to merge 1 commit into
AxisAIOrg:mainfrom
UfukNode:agent/fix-realtime-stats-test
Open

Keep realtime stats test in sync with snapshot#4
UfukNode wants to merge 1 commit into
AxisAIOrg:mainfrom
UfukNode:agent/fix-realtime-stats-test

Conversation

@UfukNode

@UfukNode UfukNode commented Aug 5, 2026

Copy link
Copy Markdown

This fixes the realtime stats browser test after the checked-in snapshot moved forward.

The test was still asserting the old task totals and daily task label, so node --test tests/realtime-stats.test.js failed on the current main data:

2207 !== 1822

Instead of baking the snapshot numbers into the test, this reads the expected task fields from data/realtime-stats.json. That keeps the test focused on parsing and formatting behavior while still letting the scheduled stats snapshot change over time.

Checked locally:

python3 -m unittest discover -s tests
python3 -m py_compile scripts/*.py tests/*.py
python3 -m json.tool data/realtime-stats.json >/dev/null
node --check realtime-stats.js
node --test tests/realtime-stats.test.js

@UfukNode
UfukNode marked this pull request as ready for review August 5, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant