Cleanup util time tests
- Use now variable instead of walking the clock. - Use iso format instead of seconds. - Pass a Date object instead of an iso format to time.<methods>so the methods off the Date object can be mocked in order to avoid timezone specific tests. Since methods like getFullYear output the year in whatever timezone the operating system is set to, these methods must be mocked/mapped to their UTC equivalents when testing such as getUTCFullYear. - Remove offseting of time based on timezone as this is now covered by mocking the getFullYear method and not needed for the decayInterval as that only cares about time deltas.
Showing
Please register or sign in to comment