-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Provider v3
drops state params in Pact file with spec v2
#1079
Comments
I don't think this is the expected behaviour. Pact spec version 2 does not support state parameters or multiple states. |
That's correct. Perhaps we shouldn't allow it in the DSL |
That's a good point. The bug report originates from my effort to upgrade from I suppose I could in principle put the stringified array into the As far as I'm concerned, we can close this bug report. |
That would be a very nice touch! 💯 |
In the V4 interface, the API itself doesn't allow incompatible things to be done like this. It's a bit harder to do with the V3 API because we allow the spec as an option in the constructor and that changes what can/can't be done later in the API, making the checks complicated/messy. I'll leave it open for now as a potential enhancement. |
Software versions
Issue Checklist
Please confirm the following:
Expected behaviour
When using the
v3
Pact provider with spec version 2, state parameters (as well as multiple states) should be present in theproviderState
field of interactions in the generated Pact file.Actual behaviour
Only the
description
of the first state is copied into theproviderState
field for each interaction.Steps to reproduce
See https://github.com/martinslota/pact-js-bug-state-params-dropped.
Relevant files
The text was updated successfully, but these errors were encountered: