v1.10.0
New features:
- add
SuperSliceOfoperator, to compare only parts of slices/arrays; - JSON parser of
JSON,SubJSONOfandSuperJSONOfis now more lax:are allowed (comma just before "}" or "]" for non-empty {…} and […]);{"foo": "bar",} [ 1, 2, 3, ] Smugglefields-path param can now dereference maps, arrays & slices:Contrary totd.Smuggle("Group.Persons[3].Age", td.Between(23, 32))JSONPointeroperator, private fields can be followed;Struct&SStructnow understand shell patterns & regexps to match struct fields;- add
IgnoreUnexportedfeature and reworkUseEqual: they both can now be scoped to some types.Struct&SStructcomply with the newIgnoreUnexported; - add
(*td.T).Parallel()method (@abhinav); - do not panic on operator misuses anymore, but raise an error on operator use. So it is easier to understand;
- introduce
nocolorhelper to easily disable coloring output of failure reports, typically useful in golang playground; tdhttppackage:- introduce multipart requests as defined in RFC 2046, see
(*tdhttp.TestAPI).PostMultipartFormData(),tdhttp.PostMultipartFormData()andtdhttp.MultipartBodytype; - headers handle
http.Cookieout-of-the-box, seetdhttp.NewRequest()documentation for details; - new
tdhttp.BasicAuthHeader()function allows to easily inject Basic Authorization header; - add
(*tdhttp.TestAPI).CmpCookies()to easily compare cookies content (@Julien2313); - add
tdhttp.Qtype to easily declare query parameters in requests, seetdhttp.NewRequest()documentation for details. Note thaturl.Valuestype is now supported as well.
- introduce multipart requests as defined in RFC 2046, see
Fixes:
- multi-lines colored text → color-off \n color-on for each line (@siadat);
JSONTypeBehind()method is now delegated when an operator is at the root of the JSON;tdhttppackage:- chaining of
Cmp*methods can lead to skewFailed()result.
- chaining of
Enjoy!