-
Notifications
You must be signed in to change notification settings - Fork 12
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 DSL Feedback #215
Comments
Thanks for this @Maxim-Filimonov - I'll take the time to digest soon, but in the meantime happy to hear everyone else's viewpoints on how the new interface is working for them. Especially considering some of the changes from the Ruby core -> Rust core and the lifecycle changes. I agree that the experience with using Jest and Pact JS is pretty nice as it is.
|
I agree. I think at the time jest-pact's V3 support was written, the "plain" v3 syntax didn't exist, and it looks like it was jest-pact's V3 support was migrated from beta without reviewing it. |
By the way, the intention for the interaction block being separate is that you should be able to do this:
That could be clearer in the docs - although I'm not actually sure this is that nice. I didn't like the name
Doesn't this happen with your example too? Repeated tests would need the same interaction defined.
Yeah. Ideally Jest-Pact should pass this on so you don't have to. |
Hi @Maxim-Filimonov Why does |
Because |
We just do this before describe block:
|
Feature description
V3 API.
Use case
I made the same code using
jest-pact
v3and
plain pact v3
:It seems to me that plain pact v3 syntax is way closer to jest and easier to understand. I have a clear separation between different interactions and only need to wrap my api calls with special
executeTest
method.While with
jest-pact
I'm getting confused as I would need to add a NEW interaction for every single interaction that I do even, so my interaction already has a name defined.I would suggest removing extra layer of interaction and provide
({ execute, provider})
directly in callback of pactWith. I presumepactWith
just maps to describe, we should be able to use standardit
blocks to separate tests instead of wrapping them in special syntax.By interaction already has a name I mean my interaction already has:
The text was updated successfully, but these errors were encountered: