<#1226 Allow using `new ArrayBuffer(0)` in withReq...
# pact-js-development
g
#1226 Allow using `new ArrayBuffer(0)` in withRequest.body to be honest in the contract tests Issue created by canny[bot] 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 pact-foundation/pact-js