airqo-platform / airqo-platform/AirQo-api
Add tests for the updateOfflineSites function
- Lingua principale
- JavaScript
- Stelle
- 26
- Fork
- 24
- Merge medio
- 5h 36m
- PR unite (30g)
- 81
Descrizione
The `updateOfflineSites` function introduced in PR https://github.com/airqo-platform/AirQo-api/pull/4082 lacks test coverage.
Specific tests should be added for:
* Updating sites as offline when they're not in the active set and beyond the threshold
* Handling empty data arrays
* Verifying the correct MongoDB query conditions are used
* Ensuring the SiteModel update operation is called with correct parameters
The test structure should follow the existing patterns in the file, using the same testing utilities (chai, sinon) and setup/teardown approach.
Refer to the comment: https://github.com/airqo-platform/AirQo-api/pull/4082#discussion_r1885023407
Requester: @Baalmart
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.