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

chore(examples):- show matchers in use on consumer/provider side for MessagePact #364

Closed
wants to merge 6 commits into from

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Jul 26, 2023

Updates to #313

Adds examples relating to answer here in original raised issue #308 (comment)

MdotMertens and others added 5 commits October 17, 2022 09:13
…ython into MdotMertens-feat/content-matchers
- dont strip matchers from pact content
- show examples of matchers in consumer message test
- show examples matchers.get_generated_values() to reify message of pact matchers
  for passing to handler under test
@YOU54F YOU54F changed the title Mdot mertens feat/content matchers chore(examples):- show matchers in use on consumer/provider side for MessagePact Jul 26, 2023
@YOU54F
Copy link
Member Author

YOU54F commented Oct 12, 2023

Hey @JP-Ellis

Although this PR won't be able to be merged now, it would still be useful to show matchers being used in the message examples and having a test to cover them.

Might be something to consider adding in to the refactored suite.

Happy for this to be closed, if its tracked somewhere 👍🏾

@JP-Ellis
Copy link
Contributor

JP-Ellis commented Oct 12, 2023

Do you think this would be covered as part of implementing the compatibility suites in:

I would definitely make use of the work in this PR so that it isn't wasted.

@YOU54F
Copy link
Member Author

YOU54F commented Oct 12, 2023

I reckon the following would be more apt for message pact 👍🏾

The main point here is the user has to call matchers.get_generated_values to reify the message (strip it of matchers) before passing it to the handler. Other languages such as pact-js call the reify method under the hood so the user doesn't need to worry about the implementation detail.

https://github.com/pact-foundation/pact-js/blob/768b70e4305669e71700a275ff4204f573788a7e/src/messageConsumerPact.ts#L193

@YOU54F YOU54F closed this Oct 13, 2023
@JP-Ellis JP-Ellis deleted the MdotMertens-feat/content-matchers branch March 11, 2024 22:28
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.

3 participants