<#431 Pact Consumer tests are failing starting wit...
# pact-js-development
g
#431 Pact Consumer tests are failing starting with node 18.10 and 19 Issue created by RaresAil Software versionsOS: MacOS Ventrua • Pact Node version: Pact Foundation 10.3.1 • Node Version: 18.10.x, 19.x 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 ☑︎ I have set my log level to debug and attached a log file showing the complete request/response cycle Expected behaviour All the tests to pass Actual behaviour The tests fail after upgrading from node
18.8.0
to
18.10.0
even on
19.x
Steps to reproduce Update to node 18.10 or 19 and run the Consumer tests Relevant log files
Copy code
● Console

    console.error


      at Pact.Object.<anonymous>.Pact.verify (../node_modules/@pact-foundation/src/httpPact/index.ts:211:15)
      at Object.<anonymous> (../node_modules/jest-pact/dist/pactWith.js:12:45)

    console.error
      �[31mPact verification failed!�[39m

      at Pact.Object.<anonymous>.Pact.verify (../node_modules/@pact-foundation/src/httpPact/index.ts:212:15)
      at Object.<anonymous> (../node_modules/jest-pact/dist/pactWith.js:12:45)

    console.error
      �[31mTest failed for the following reasons:
      
        Mock server failed with the following mismatches:
      
      	0) The following request was expected but not received: 
      	    Method: POST
      	    Path: ...
      	    Headers:
      	      Accept: application/json
      	      Authorization: Bearer mock
      	      Content-Type: application/json
      	    Body: ...

      at Pact.Object.<anonymous>.Pact.verify (../node_modules/@pact-foundation/src/httpPact/index.ts:213:15)
      at Object.<anonymous> (../node_modules/jest-pact/dist/pactWith.js:12:45)

  ● Pact between .... returns the correct response

    socket hang up

      at Function.Object.<anonymous>.AxiosError.from (../node_modules/axios/lib/core/AxiosError.js:89:14)
      at RedirectableRequest.handleRequestError (../node_modules/axios/lib/adapters/http.js:533:25)
      at ClientRequest.eventHandlers.<computed> (../node_modules/follow-redirects/index.js:14:24)

  ● Pact between ... returns the correct response

    Pact verification failed - expected interactions did not match actual.

      at new VerificationError (../node_modules/@pact-foundation/pact/src/errors/verificationError.js:21:42)
      at Pact.Object.<anonymous>.Pact.verify (../node_modules/@pact-foundation/src/httpPact/index.ts:217:13)
      at Object.<anonymous> (../node_modules/jest-pact/dist/pactWith.js:12:45)

Failed to initialise global tracing subscriber - a global default trace dispatcher has already been set
pact-foundation/pact-js-core