v1.9.0
New features:
- introducing new
tdsuite
helper, allowing to easily create testing suites, fully integrated with go-testdeep; JSON
,SubJSONOf
andSuperJSONOf
now accept almost all operators embedded directly in JSON thanks to our new custom JSON decoder:td.Cmp(t, got, td.JSON(`{"name": HasPrefix("Bob"), "age": Between(20, 25)}`), )
Re
andReAll
capture parameter can now be a[]interface{}
(only[]string
until now);Flatten
is now able to flatten maps, can be useful when creating request usingtdhttp
package;- when a
Cmp
failure occurs outside the root of a test function, a trace of all successive function calls is displayed to help the user to understand/locate the error; - in
tdhttp
helper (aka the ultimate HTTP API tester),tdhttp.TestAPI
gains several methods:AutoDumpResponse
allows to dump the HTTP response when the first error is encountered after a request,OrDumpResponse
dumps the response if at least one previous test failed,Run
runs a subtest,T
returns the internal instance of*td.T
,With
creates a new*TestAPI
instance.
Fixes:
reflect.Interface
containingnil
could produce wrong comparisons.
Enjoy!