v1.9.0
New features:
- introducing new
tdsuitehelper, allowing to easily create testing suites, fully integrated with go-testdeep; JSON,SubJSONOfandSuperJSONOfnow 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)}`), )
ReandReAllcapture parameter can now be a[]interface{}(only[]stringuntil now);Flattenis now able to flatten maps, can be useful when creating request usingtdhttppackage;- when a
Cmpfailure 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
tdhttphelper (aka the ultimate HTTP API tester),tdhttp.TestAPIgains several methods:AutoDumpResponseallows to dump the HTTP response when the first error is encountered after a request,OrDumpResponsedumps the response if at least one previous test failed,Runruns a subtest,Treturns the internal instance of*td.T,Withcreates a new*TestAPIinstance.
Fixes:
reflect.Interfacecontainingnilcould produce wrong comparisons.
Enjoy!