Releases: microbus-io/testarossa
Releases · microbus-io/testarossa
Special equality check for time.Time
Match and NotMatch asserters
- New asserters - Match and NotMatch - to test a string against a regular expression.
- Fail fast in Expect when checking for a nil error, in order to avoid excessive failures when asserting the return arguments of a function call
HTML asserters
- HTMLMatch and HTMLNotMatch enable searching inside the DOM of an HTML document
- Additional unit tests
- Attribution.MD file
Not/Contains: support mix of string and []byte
Cast to string when Contains or NotContains get a mix of string and []byte arguments.
Improved testing
Improved unit tests to check for both the application of a failure on t and the return value of the asserter.
Nil equality check, Expects
- Improved the
EqualandNotEqualasserters to better detect nil values - Added a new asserter
Expectfor an equality checks of a list of arguments
Improvements to Contains and NotContains
- Added explicit support for []byte containing or not containing a sub []byte
- Performance optimization for element matching in slices and maps
Fuller stack trace on fail
- Print the full stack trace with a failure message, not just a single stack frame
--- FAIL: Test_Something
/github.com/microbus-io/testarossa/some_test.go:389
/github.com/microbus-io/testarossa/some_test.go:154
Expected 'foo' to contain 'bar'
Nil check
Additional improvements to failure messages
- Improve detection of stack location
- Truncate large value strings to 1K in length
- Fix: missing type name in failure message when the type doesn't have a length