Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock time.Time #104

Open
PossibleLlama opened this issue Sep 27, 2021 · 0 comments
Open

Mock time.Time #104

PossibleLlama opened this issue Sep 27, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@PossibleLlama
Copy link
Owner

PossibleLlama commented Sep 27, 2021

Is your feature request related to a problem? Please describe.
Occasionally, the tests fail because the mocks are expecting the time to be a millisecond before the actual time.

Describe the solution you'd like
Use an interface for the time functions we need, and then mock them out when testing.

Additional context
This only needs to be in place for unit tests, everything else will use the real implementation.

@PossibleLlama PossibleLlama added the bug Something isn't working label Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant