-
Notifications
You must be signed in to change notification settings - Fork 51
Description
With the opportunity to use generics to improve the assert package (#255), we may want to release a new major version. This issue is to discuss and track changes that would require a major version bump, so that we can include all of them when the time is right.
-
Change the signature of the
assert, andassert/cmpfunctions to use generics instead ofanyas the argument types (assert: use type constraints (generics)Β #255) -
Combine the
skip,env, andpollpackages into a single new package. These packages are very small, and combining them into a single package should make it easier to usegotest.toolsby requiring fewer imports. I'm not sure what to name that package yet. They could be included as part of theassertpackage, but the names don't read as well. -
Replace the
goldenpackage with aGoldenFile(t, filename)function in theassertpackage. assert: golden variablesΒ #237 added support for golden-like behaviour using expected values stored in a Go variable. We should be able to do something similar:func GoldenFile(t TestingT, filename string) string { ... }
Similar to golden variables, when called with
-update,assert.Assertshould be able to detect that the expected argument is aGoldenFileand use the actual value to update the specified filename. -
Maybe
icmdcould change to usecontext.Contextto set the timeout instead of atime.Durationpassed toWaitOnCommand? Some way to pass a deadline/timeout usingcontext.Contextmight be good.
Are there other breaking changes we should consider? Anything in fs that could change now that the stdlib has an fs package or because of generics?