<#1073 V4 Pacts ignore repsonse builder> Issue cre...
# pact-js-development
g
#1073 V4 Pacts ignore repsonse builder Issue created by jaecktec Software versions • @pact-foundation/pact: 11.0.1 • @pact-foundation/pact-core: 13.13.5 Issue Checklist Please confirm the following: ☑︎ I have upgraded to the latest ☑︎ I have the read the FAQs in the Readme ☑︎ I have triple checked, that there are no unhandled promises in my code and have read the section on intermittent test failures ☐ I have set my log level to debug and attached a log file showing the complete request/response cycle ☐ For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem Expected behaviour Specified repsonse body is returned from the server Actual behaviour
Copy code
INFO tokio-runtime-worker pact_mock_server::hyper_server: Request matched, sending response HTTP Response ( status: 200, headers: None, body: Missing )
Steps to reproduce
Copy code
new PactV4({
	consumer: 'c',
	provider: 'p',
}).addInteraction()
  .given('given', {})
  .uponReceiving('a request')
  .withRequest('GET', '/path', (builder) => {})
  .willRespondWith(200, (builder) => {
    builder.jsonBody({ some_body: {} });
  })
  .executeTest((mockServer) => axios.get(`${mockServer.url}/path`).then(({ data })=> {
    assert(data, 'body is missing');
  }));
Notes I think the issue is here: this line ignores the builder. A workaround to make it work is, to register a plugin. Because then this line is being used pact-foundation/pact-js