I have two JsonNull instances that are reported as not having the same type:
mismatches={$.0.link=[BodyMismatch(expected=null, actual=null, mismatch=Expected null (JsonNull) to be the same type as null (JsonNull), path=$.0.link, diff=null)] ...}
The bug seems to be in MatcherExecutor::matchType. JsonNull is never handled there.
Did anyone get a chance to look into this bug? If not, I'll try to make a PR myself when I have the time.
@audunhalland I'm having this same problem, are you by chance nesting your null within a like()?
We've noticed this problem come up when we converted from something like
const matcher = {
a: null,
b: like(someMatcher)
};
to
const matcher = like({
a: null,
b: someMatcher
});
For me the problem appeared after an attempted upgrade from pact-jvm 3.x to 4.x.
Version 4.0.5 has been released with this change
Most helpful comment
Version 4.0.5 has been released with this change