Merge contract test package.json with root package.json

Based on discussion in !84687 (comment 956147351), opting to split the investigation to merge the package.json under spec/contracts/consumer with the one in the root. Attempt to merge it resulted in the following error:

 FAIL  spec/contracts/consumer/specs/metadata.spec.js
  ● Test suite failed to run

    Unhandled Promise rejections: Error: Caught error after test environment was torn down

    Couldn't start Pact with PID: 4739

      at runTestInternal (node_modules/jest-runner/build/runTest.js:446:5)

[2020-07-06 00:00:00.000 +0000] ERROR (4735 on Richards-MacBook-Pro.local): pact@9.17.3: The pact mock service doesn't appear to be running
  - Please check the logs above to ensure that there are no pact service startup failures
  - Please check that pact lifecycle methods are called in the correct order (setup() needs to be called before this method)
  - Please check that your test code waits for the promises returned from lifecycle methods to complete before calling the next one
  - To learn more about what is happening during your pact run, try setting logLevel: 'DEBUG'
[2020-07-06 00:00:00.000 +0000] ERROR (4735 on Richards-MacBook-Pro.local): pact@9.17.3: The pact mock service doesn't appear to be running
  - Please check the logs above to ensure that there are no pact service startup failures
  - Please check that pact lifecycle methods are called in the correct order (setup() needs to be called before this method)
  - Please check that your test code waits for the promises returned from lifecycle methods to complete before calling the next one
  - To learn more about what is happening during your pact run, try setting logLevel: 'DEBUG'
[2020-07-06 00:00:00.000 +0000] ERROR (4735 on Richards-MacBook-Pro.local): pact@9.17.3: The pact mock service doesn't appear to be running
  - Please check the logs above to ensure that there are no pact service startup failures
  - Please check that pact lifecycle methods are called in the correct order (setup() needs to be called before this method)
  - Please check that your test code waits for the promises returned from lifecycle methods to complete before calling the next one
  - To learn more about what is happening during your pact run, try setting logLevel: 'DEBUG'

Potential Investigation Areas:

  1. The root package.json may have something that is conflicting with how the consumer test runs.
  2. There could be something in jest.config.js or jest.config.base.js
Edited by Richard Chong