feat(#2): Crowdsourcing validation, aggregation and tests #10

Merged
ti-paul merged 1 commit from feature/2-crowdsourcing into main 2026-06-12 09:38:44 +00:00
Member

Closes #2

Enhanced: src/crowdsourcing.js

  • Input validation (dB range, coords bounds)
  • aggregateByLocation: stats per location
  • Throws on invalid data before storage

New: tests/crowdsourcing.test.js

  • 26 tests: validation, CRUD, filtering, aggregation

126 total pass.

Closes #2 ## Enhanced: src/crowdsourcing.js - Input validation (dB range, coords bounds) - aggregateByLocation: stats per location - Throws on invalid data before storage ## New: tests/crowdsourcing.test.js - 26 tests: validation, CRUD, filtering, aggregation **126 total pass.**
feat(#2): Crowdsourcing validation, aggregation and tests
Some checks failed
CI / test (pull_request) Failing after 0s
1b4bf70dab
Enhanced src/crowdsourcing.js:
- validateReading: dB range (-10 to 200), lat/lon bounds checking
- addCrowdReading: validates before storing, throws on invalid
- aggregateByLocation: avg/min/max dB per location, verified count
- Coerced lat/lon to Number on storage

New tests/crowdsourcing.test.js:
- 26 tests covering validation, CRUD, filtering, aggregation
- Tests for boundary values, error cases, empty state

All 126 tests pass. Closes #2.
ti-paul left a comment
No description provided.
26 tests, 126 total. Validation + aggregation. 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!10
No description provided.