Repository navigation
Commit 8008bc0
committed
chore(dashboard): fix stale trend-chart docstring + dedupe All-range test mock
Adversarial-review follow-ups to PR #1257:
- frontend/src/dashboard.ts: the loadSavingsTrendChart docstring still
described the pre-QA-2.3 "empty windows render labelled axes" behaviour;
the shipped code (lines 1083-1098) shows a filter-aware empty-state
banner instead. Reconciled the docstring to describe the actual three
branches (data / empty / fetch-error).
- frontend/src/__tests__/dashboard.test.ts: the new "All range sends ~365d
start" test set mockResolvedValue twice with a mockClear() in between.
mockClear() resets call history but NOT mock return values, so the first
set was dead code. Collapsed to a single mockResolvedValue + mockClear
with a clarifying comment.
97 dashboard tests pass, tsc clean. No behaviour change.1 parent 7852184 commit 8008bc0
2 files changed
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
| 887 | + | |
| 888 | + | |
887 | 889 | | |
888 | 890 | | |
889 | 891 | | |
890 | 892 | | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | 893 | | |
895 | 894 | | |
896 | 895 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1003 | 1003 | | |
1004 | 1004 | | |
1005 | 1005 | | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1011 | 1014 | | |
1012 | 1015 | | |
1013 | 1016 | | |
| |||
0 commit comments