v1.10.0
New features:
- add
SuperSliceOf
operator, to compare only parts of slices/arrays; - JSON parser of
JSON
,SubJSONOf
andSuperJSONOf
is now more lax:are allowed (comma just before "}" or "]" for non-empty {…} and […]);{"foo": "bar",} [ 1, 2, 3, ]
Smuggle
fields-path param can now dereference maps, arrays & slices:Contrary totd.Smuggle("Group.Persons[3].Age", td.Between(23, 32))
JSONPointer
operator, private fields can be followed;Struct
&SStruct
now understand shell patterns & regexps to match struct fields;- add
IgnoreUnexported
feature and reworkUseEqual
: they both can now be scoped to some types.Struct
&SStruct
comply 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
nocolor
helper to easily disable coloring output of failure reports, typically useful in golang playground; tdhttp
package:- introduce multipart requests as defined in RFC 2046, see
(*tdhttp.TestAPI).PostMultipartFormData()
,tdhttp.PostMultipartFormData()
andtdhttp.MultipartBody
type; - headers handle
http.Cookie
out-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.Q
type to easily declare query parameters in requests, seetdhttp.NewRequest()
documentation for details. Note thaturl.Values
type 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);
JSON
TypeBehind()
method is now delegated when an operator is at the root of the JSON;tdhttp
package:- chaining of
Cmp*
methods can lead to skewFailed()
result.
- chaining of
Enjoy!