We could add unit tests to each of the methods in `services/metricService.ts` Probably use jest unless you know of a better unit testing framework.