Is your feature request related to a problem? Please describe.
src/server/test/web/meters.js has the comment:
// TODO These tests are not as good as they should be now that information on
// meters is returned to all users. They should be updated.
src/server/test/db/meterTests.js has the comment:
// TODO add 2 new unit parameters for meters.
src/server/test/web/csvPipelineTest.js has the comment:
// TODO It would be nice to make this use the code in src/server/test/db/meterTests.js and make
// all meter tests use one common function fo meter comparison.
These are somewhat correct but more work is needed.
Describe the solution you'd like
This following tests should be added to src/server/test/web/meters.js:
Once all are complete the TODO comments can be removed and the TODO design document updated to reflect it is complete.
Describe alternatives you've considered
None
Additional context
None
Is your feature request related to a problem? Please describe.
src/server/test/web/meters.js has the comment:
src/server/test/db/meterTests.js has the comment:
src/server/test/web/csvPipelineTest.js has the comment:
These are somewhat correct but more work is needed.
Describe the solution you'd like
This following tests should be added to src/server/test/web/meters.js:
expectMetersToBeEquivalentand as values in the tests that specify meter data.Meter.convertUnitValueis called to convert the value between null and -99 for JS vs database value. A test should be created to verify that the -99 value is correctly returned to know the conversion works both ways.insertandupdateuseMeter.convertUnitValueto make sure the values are correct. Tests should be created where the changed values are different from the desired values and the returned values are the correct.insertand getting a single meter id. It would be good if it checkedupdateand the other get functions that were not added when meterTests.js was rolled into this file.compareMetersand importexpectMetersToBeEquivalentfrom src/server/test/web/meters.js and use that instead. This addresses the TODO in this file but does it by using a different, common test function.Once all are complete the TODO comments can be removed and the TODO design document updated to reflect it is complete.
Describe alternatives you've considered
None
Additional context
None