Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix can't match array of numbers #463

Merged

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Sep 6, 2024

Before the fix:

2024-09-06T04:24:10.924510Z DEBUG tokio-runtime-worker pact_matching: --> Mismatches: [BodyMismatch { path: "$.$.age", expected: Some(b"[\"27\"]"), actual: Some(b"[\"41\"]"), mismatch: "Unable to match [\"27\"] using Number" }]

After the fix:

2024-09-06T04:18:29.737113Z DEBUG tokio-runtime-worker pact_matching::matchingrules: Comparing '["27"]' to '["41"]' using Number -> Ok(())
2024-09-06T04:18:29.737122Z DEBUG tokio-runtime-worker pact_matching::matchingrules: Comparing list item 0 with value 'Some("41")' to '"27"'
2024-09-06T04:18:29.737147Z DEBUG tokio-runtime-worker pact_matching::matchers: String -> String: comparing '27' to '41' ==> true cascaded=true matcher=Number

@tienvx tienvx marked this pull request as ready for review October 30, 2024 02:53
@rholshausen rholshausen merged commit 9c3bfb6 into pact-foundation:master Nov 13, 2024
37 checks passed
@tienvx tienvx deleted the fix-cant-match-array-of-numbers branch November 13, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants