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

Add Time Mocking, No Deps #328

Closed
wants to merge 3 commits into from

Conversation

tooolbox
Copy link

I noticed that adding deps may not be appreciated so this is an alternate to #327

It adds zero deps, with the tradeoff that there's no convenient way to perform mocked-time tests within the package. (Seems like it might be useful for things like #321 or #325 but that's not my call.)

I did leave the schedule behavior test in there, behind a build tag, so you can try it out with go test --tags=clock if you like. I can also remove that file, but I thought it gave a good example of how to perform mocked-time tests, including the adapter needed to wire in the mixer/clock.

@tooolbox
Copy link
Author

tooolbox commented Aug 3, 2020

Any thoughts, @robfig ?

@tooolbox tooolbox mentioned this pull request Aug 5, 2020
@tooolbox tooolbox closed this Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant