You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
react-scripts test --testTimeout 30000 pact.spec.js runs the consumer test adapted from the Getting Started tutorial
Actual behaviour
FAIL src/builder/pact/api.pact.spec.js
● Test suite failed to run
TypeError: createColors is not a function
> 1 | import { PactV3 } from '@pact-foundation/pact';
| ^
2 |
3 | const mockProvider = new PactV3({
4 | logLevel: 'debug',
at Object.<anonymous> (node_modules/pino-pretty/lib/colors.js:19:25)
at Object.<anonymous> (node_modules/pino-pretty/index.js:8:16)
at Object.<anonymous> (node_modules/@pact-foundation/pact-core/src/logger/pino.ts:2:1)
Are you able to please share a repro? It's possible it's a configuration of the build causing this issue, otherwise I'd expect to see it in the CI builds for this repo.
@mefellows thanks so much for taking a look - https://github.com/brucem1976/pact-test with yarn install and npm run test:pact reproduces it - seems to be something related to the specific package.json contents
brucem1976
changed the title
TypeError: cresteColors is not a function (pino-pretty dependency)
TypeError: createColors is not a function (pino-pretty dependency)
Sep 8, 2023
Thanks for this! That makes some sense, it looks like we'll need to upgrade the examples.
I'll close this for now, as it looks like a compatibility issue with react scripts. If there is something we could be doing, we can re-open and address.
Software versions
Issue Checklist
Please confirm the following:
Expected behaviour
react-scripts test --testTimeout 30000 pact.spec.js
runs the consumer test adapted from the Getting Started tutorialActual behaviour
Steps to reproduce
Relevant log files
As above - log level set to debug on the configuration of PactV3
The text was updated successfully, but these errors were encountered: