fix: broken history test + add 18 e2e CLI tests (84 total) #8

Merged
ti-paul merged 1 commit from fix/history-test-dates into main 2026-06-11 19:42:32 +00:00
Member

Bug Fix + E2E Tests

Fix

  • history.test.js etait casse: les timestamps hardcodes (mai 2026) etaient expires par rapport a la date du test (juin 2026). Utilise maintenant des dates relatives.

E2E Tests (18 nouveaux)

Tests CLI complets via execSync:

  • Full Flow: init -> add -> stats -> map -> report -> delete -> list
  • History: trend chart
  • Export: CSV + JSON
  • Crowdsourcing: add/list/verify, crowd-map
  • Error Handling: missing args, non-existent, unknown command
  • Help: usage display

84 tests passent (66 existants + 18 nouveaux)

## Bug Fix + E2E Tests ### Fix - `history.test.js` etait casse: les timestamps hardcodes (mai 2026) etaient expires par rapport a la date du test (juin 2026). Utilise maintenant des dates relatives. ### E2E Tests (18 nouveaux) Tests CLI complets via `execSync`: - **Full Flow**: init -> add -> stats -> map -> report -> delete -> list - **History**: trend chart - **Export**: CSV + JSON - **Crowdsourcing**: add/list/verify, crowd-map - **Error Handling**: missing args, non-existent, unknown command - **Help**: usage display **84 tests passent** (66 existants + 18 nouveaux)
fix: broken history test + add 18 e2e CLI integration tests (84 total)
Some checks failed
CI / test (pull_request) Failing after 0s
bb82e09f59
- Fix history.test.js: use relative dates instead of hardcoded timestamps
  (tests were failing because data was from May but test ran in June)
- Fix assertions: remove hardcoded date strings, use dynamic checks

- Add 18 e2e CLI flow tests:
  - Full flow: init -> add -> stats -> map -> report -> delete -> list
  - History: trend chart display
  - Export: CSV and JSON formats
  - Crowdsourcing: add/list/verify crowd readings, crowd-map
  - Threshold: multiple readings, no alerts without config
  - Error handling: missing args, non-existent readings, unknown cmds
  - Help: usage display

All 84 tests pass.
ti-paul left a comment
No description provided.
Bug fix + 18 tests e2e. 84/84 passent. LGTM.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
les_clankeurs/bruit-map!8
No description provided.