quicktest
quicktest copied to clipboard
Quick helpers for testing Go applications
I was just thinking that the package layout in this module is a bit weird. I understand that we want the uses of the API to be short, so `qt.Assert`...
This PR proposes one form of an EventuallyChecker, which allows asserting eventually (i.e. retry for a given period of time until the assertion holds true) and also for stability (i.e....
Error handling is tedious, and when writing tests we are prioritizing getting the test written quickly rather than necessarily making it the most robust piece of code we ever wrote....
This allows users to have full control over the regular expression used for matching. My use-case was matching a multiline string pattern, and the way MatchString was used in the...
While working on a fix for https://github.com/frankban/quicktest/issues/125 it appeared that there could be an opportunity for improving the `Not(Checker)` error message for standard checkers, such as Equals, IsTrue etc.
The stack traces produced by quicktest are extremely awesome. However, I've found a scenario where they can be verbose in a way that's probably a bug: inline function definitions. It's...
The [documentation for Assert](https://pkg.go.dev/github.com/frankban/quicktest#Assert) has this bit in it: ``` Additional args (not consumed by the checker), when provided, are included as comments in the failure output when the check...
Here's an idea for an API to make it easier to wait for a given condition to become true: ``` package quicktest import "github.com/rogpeppe/retry" // Eventually calls its provided function...
I’d love a source code rewriter that ports existing tests to quicktest. Could start with just the low-hanging fruit, the obvious cases. Bonus for also rewriting from testify. :) With...
Note: WORK IN PROGRESS From [an idea](https://twitter.com/bradfitz/status/1387817724634492928) from Brad Fitzpatrick, this makes it possible to show source code in test failures even when the source code isn't currently available. Still...