-
-
Notifications
You must be signed in to change notification settings - Fork 354
Feat/v4 asynchronous messages pact core v17 #1564
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
base: master
Are you sure you want to change the base?
Conversation
- Refactors the GraphQL common utilities into a single package - Refactors the V4 HTTP package into multiple files (lint)
c35ad0f
to
5714684
Compare
Depends on upstream change here: https://github.com/pact-foundation/pact-js-core/pull/662 | ||
|
||
## Breaking changes | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to do MatchersV3
at the same time. It felt like it made sense.
|
||
// Arrange | ||
provider | ||
.addInteraction(indexInteraction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought it would be nice to show a usecase with multiple interactions in a single test (Pact Broker Client traverses multiple calls via HAL relations) and see what it lookss like.
It feels like it would be nice to chain an addInteraction
off a willRespondWith
here
// | ||
// We need to setup two interactions in Pact to handle this | ||
|
||
// TODO: This would be more ergonomic, if we could chain adding a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note the TODO.
Having a first class way of adding a second interaction here, rather than it just working via what looks like magic :)
V4InteractionWithResponse won't allow chaining of a V4UnconfiguredInteraction.
Could addInteraction accept a configured interaction?
I assume for most parts having it for the http interactions would be suitable, or only allow chaining of similar interaction types. Haven't though too much of whether it would apply for messaging, but may need to be considered for plugin interactions.
Sample projects consuming the updated code
pact-js consumers |
Co-authored-by: valkolovos <val.kolovos@guildeducation.com>
Needs cleanup of types and refactoring/extraction of examples This change is also dependent on an upstream change in pact-core
… renamaed to PactV2 / MatchersV2
e7db057
to
4ff4606
Compare
testing #1520 with #1563