Comment

Comment by michaelfeathers

The guys who came up with the mock object approach to TDD would say that you shouldn't be mocking external libraries directly. You want your own time abstraction which is probably far simpler than what you get from a library that has to satisfy everyone's needs.

I think that building that level of isolation between you and your framework or library is just basic good practice. The fact that you need time doesn't change, but the way that you get it might.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton