We’re working on using matchers using the `pactffi...
# general
f
We’re working on using matchers using the
pactffi_matches_json_value
function, and are seeing some unexpected behavior for some more advanced rules where the check passes even though it shouldn’t… For example, with an
arrayContains
matching rule, no error is returned even though an array with one element that doesn’t satisfy the matching rules is passed to it. Here’s the line in the pactffi log for the check:
Copy code
2025-03-31T15:16:12.632536Z DEBUG ThreadId(01) pact_matching::json: JSON -> JSON: Comparing '[{"baz":42,"foo":"bar"}]' to '["bla"]' using ArrayContains([(0, MatchingRuleCategory { name: BODY, rules: {DocPath { path_tokens: [Root, Field("baz")], expr: "$.baz" }: RuleList { rules: [Type], rule_logic: And, cascaded: false }} }, {})]) -> Ok(())
We’re using pactffi release 0.4.26 btw, am I missing something here?
m
This convo might best be moved to #C02BXLDJ7JR, if that’s OK?
f
Sure, wasn’t aware of that channel!
m
no probs - thanks!