pact-foundation / jest-pact

A Pact adaptor for to allow you to easily run tests with Jest
https://pact.io
MIT License
81 stars 12 forks source link

Logging in jest-pact V3 Beta #206

Closed raicubogdan closed 2 years ago

raicubogdan commented 2 years ago

Hello!

I work in a project where we initially implemented the usual version of jest-pact and pact-foundation/pact, but we decided to migrate to Pact V3 Beta. Everything works fine and we are pleased with the change, but there seems to be an issue with logging. There is no documentation (at least I didn't find any) on logging for V3 and the pactWith() options no longer contain logging related properties.

My questions are: Is logging implemented in V3? Where can I get some documentation on it? And if it is not yet integrated in the beta version, when should we expect its integration?

Currently using: @pact-foundation/pact: ^10.0.0-beta.54 jest-pact: ^0.9.0-beta.v3

Thanks!

YOU54F commented 2 years ago

Hello @raicubogdan, thanks for raising an issue (and using jest-pact!),

The V3 readme is here (it is linked in the main readme)

https://github.com/pact-foundation/jest-pact/blob/pact-js-v3/README.md#configuration

The logging options should remain the same,

https://github.com/pact-foundation/jest-pact/blob/a7b39380473e10b6939c89cbf8bd701f85bd513c/src/index.ts#L5

and it uses PactOptions exported from pact-js.(this is a wrapper around pact-js for convenience when using Jest)

YOU54F commented 2 years ago

Hey @raicubogdan, is this still an issue for you, if so, please let me know and we can reopen