Skip to content

Unit readings test cleanup - #1694

Open
Better-Code-Saul-E wants to merge 9 commits into
OpenEnergyDashboard:developmentfrom
Better-Code-Saul-E:unit-readings-test-cleanup
Open

Unit readings test cleanup#1694
Better-Code-Saul-E wants to merge 9 commits into
OpenEnergyDashboard:developmentfrom
Better-Code-Saul-E:unit-readings-test-cleanup

Conversation

@Better-Code-Saul-E

Copy link
Copy Markdown
Contributor

Description

Migrated src/server/test/routes/unitReadingsRouteTests.js to match the newer ParamsTest.js route parameter testing style and renamed the file to unitReadingsParamsTest.js.

  • Renamed the test file to unitReadingsParamsTest.js for naming consistency.
  • Updated validation checks to use standard validation helper.
  • Refactored HTTP request queries to include required parameter like 'readingInterval' and UTC time intervals.
  • Cleanedup unsused imports and dead code.

Fixes #1662

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

N/A

@huss

huss commented Aug 7, 2026

Copy link
Copy Markdown
Member

@Better-Code-Saul-E Thank you for another contribution. It will be about a week before I can review this work. I didn't know if you saw this but the tests and/or checks failed. FYI.

@Better-Code-Saul-E

Copy link
Copy Markdown
Contributor Author

Found the bug! I added an await when creating the test meter.

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.

Update unit readings route tests to newer route parameter testing style

2 participants