Feisal Ahmad
03/31/2025, 3:22 PMpactffi_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:
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?Matt (pactflow.io / pact-js / pact-go)
Feisal Ahmad
04/01/2025, 4:21 PMMatt (pactflow.io / pact-js / pact-go)