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

Allow using new ArrayBuffer(0) in withRequest.body to be honest in the contract tests #1226

Open
canny bot opened this issue Jun 26, 2024 · 1 comment

Comments

@canny
Copy link

canny bot commented Jun 26, 2024

Our Team Lead proposed exciting things when we tried to cover our API endpoint (.NET language) with a contract test, which required binary content in the request body. But, as Matt Fellows mentioned, we cannot interpret new ArrayBuffer(0) in something at JSON.
So, my question is - can we allow engineers to use new ArrayBuffer(0) in withRequest.body, but with interpretation to something like empty JavaScript object ( {} ) or something "magic" actions. In any case, this allowed us to write more honest contract tests, with explicit marks, that we expected to use in the request body - new ArrayBuffer(0) and can verify that in the generated pact specification.

https://pact.canny.io/admin/board/feature-requests/p/allow-using-new-arraybuffer0-in-withrequestbody-to-be-honest-in-the-contract-tes

Copy link
Author

canny bot commented Jun 26, 2024

This issue has been linked to a Canny post: Allow using new ArrayBuffer(0) in withRequest.body to be honest in the contract tests 🎉

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

No branches or pull requests

0 participants