Open colemickens opened 5 years ago
Thanks, @colemickens. I've got a PR open to support mocking the clock.
Thank you, especially for the very fast turnaround. Cheers!
Actually, I don't really understand how this is usable. It's not exported and there's no setter functionality. I think this should be reopened.
I misunderstood - you want to be able to test this from an external package. I've included support for that now in #17.
Also this change seems to break TOTP. AFAIK the clock needs to be initialised.
When I looked, it didn't seem like it was possible to mock the various usages of
time.Now
making it hard to do nice testing around this library.Thanks!