Skip to content

Comments

Add Time Mocking, No Deps#328

Closed
tooolbox wants to merge 3 commits intorobfig:masterfrom
tooolbox:feature/mock-no-deps
Closed

Add Time Mocking, No Deps#328
tooolbox wants to merge 3 commits intorobfig:masterfrom
tooolbox:feature/mock-no-deps

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