-
-
Notifications
You must be signed in to change notification settings - Fork 349
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] Using fromProviderState on body doesn't work properly #633
Comments
Lines 404 to 417 in 45bb7c4
|
it's not limited to |
adding |
Actually, I think this is due to the content type not being JSON, so it not knowing to process the intermediate format |
@uglyog you are right setting the headers in the response to |
Sorry, I wasn't saying to do that to fix it, but rather, that is the cause of the issue. I also can't understand why we are converting the bodies to JSON (https://github.com/pact-foundation/pact-js/blob/feat/v3.0.0/src/v3/pact.ts#L171), when we can just pass them through. I'm going to try change that, so we don't need to use the content type to know if we need to process the body. |
should be fixed by #672 |
v10.0.0-beta.36 is on the way out now. |
Software versions
Please provide at least OS and version of pact-js
Issue Checklist
Please confirm the following:
Expected behaviour
fromProviderState on Body should return proper body
eg.
Actual behaviour
The body returned is not string, rather a pact object
Steps to reproduce
See the bug reproduced in dpakach#2
Test on https://github.com/dpakach/pact-js/pull/2/files#diff-656f935c93a4d4ea910cb4961f3463c434eb6ea7cbe8d51e2c7b0b3fd4c5ae0cR101
The text was updated successfully, but these errors were encountered: