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

[V3] eachKeyLike doesn't ignore the key's value when matching #662

Closed
4 of 5 tasks
francislobo opened this issue May 10, 2021 · 5 comments
Closed
4 of 5 tasks

[V3] eachKeyLike doesn't ignore the key's value when matching #662

francislobo opened this issue May 10, 2021 · 5 comments
Labels
bug Indicates an unexpected problem or unintended behavior smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear

Comments

@francislobo
Copy link

Software versions

  • OS: Win 10
  • Consumer Pact library: "@pact_foundation/pact": "10.0.0-beta.34", "jest-pact": "0.9.0-beta.v3",
  • Provider Pact library: pact-jvm-provider-gradle', version: '4.0.10'
  • Node Version: v12.13.1

Issue Checklist

Please confirm the following:

  • I have upgraded to the latest
  • I have the read the FAQs in the Readme
  • I have triple checked, that there are no unhandled promises in my code
  • I have set my log level to debug and attached a log file showing the complete request/response cycle
  • For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem

Expected behaviour

For an example data shown here, the PACT generated using PACT JVM and PACT JS are different.
Specifically this sectiongenerated from the eachkeylike matchers. This breaks the eachkeylike matcher where the actual key should be ignored and only the value (contents) of the key must be matched.

Pact generated from JS
Pact generated from JVM
NOTE: there are some extra pattern matchers on the request path of JVM PACT. I hadn't added them on the JS part as I was just getting started (I assume that shouldnt change how eachKeyLike works)

JS code used to generate the contract

Actual behaviour

The PACTs should be identical for the eachkeylike section

Steps to reproduce

How can someone else reproduce this bug?
The gist files has all the code required to reproduce this

Relevant log files

none

Slack conversation pertaining to this issue

@francislobo francislobo added the bug Indicates an unexpected problem or unintended behavior label May 10, 2021
@francislobo francislobo changed the title [V3] eachKeyLike doesn't ignore the key value when matching [V3] eachKeyLike doesn't ignore the key's value when matching May 10, 2021
@mefellows
Copy link
Member

Thanks @francislobo, I'll take a look at this on Monday.

@YOU54F
Copy link
Member

YOU54F commented Aug 25, 2022

@mefellows
Copy link
Member

I think this might be related to #952 .

@mefellows
Copy link
Member

Fixed in #1103 and pact-foundation/pact-js-core#462. Latest release in the core going out shortly, which is a transitive dependency that will get pulled in with new installs/updates.

@mefellows mefellows added the smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear label Jul 27, 2023
@github-actions
Copy link

👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-1218). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.

See our documentation for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior smartbear-supported SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear
Projects
None yet
Development

No branches or pull requests

3 participants