which is correct except for count, which your code does not update when from, to, or limit is set. I would need to look at the source for the tests to see if the log test checks the count but it’s either that or it’s the often mentioned timezone offset problem that’s keeping you from passing the penultimate test. Everything else was passing.
You are not getting correct output because of the inadequate checking of the from and to date query string parameters. You have only one check, if (from || to) { .... What happens when from is not provided (and its value is undefined)? The result is not correct in the response.
Your parameter validation must be complete for all cases of non-existence / existence of the from and / or to.