pactflow / pact-msw-adapter

Create MSW (mock-service-worker) mocks, and generate pact contracts from the recorded interactions.
MIT License
44 stars 15 forks source link

In the Pact json file the description could be same as test name #154

Open ppaliwalgp opened 9 months ago

ppaliwalgp commented 9 months ago

Checklist

Before making a feature request, I have:

Feature description

The description in the generated Pact json file has value something like this '4624e592-115c-4bca-9bbe-f95a19b34854'. Same is displayed on Pactflow when the file is published. Instead if this could be a test name it would be helpful.

Use case

I presume that Pact file in Cypress doesn't display description this way. If the description has test name it would improve the readability of consumer tests in the Pactflow.

YOU54F commented 8 months ago

it's set here

https://github.com/pactflow/pact-msw-adapter/blob/3889c23e9bcc583b50d7b329fc1d8077172e797a/src/convertMswMatchToPact.ts#L38

feel free to propose a PR if you can pick up the test name. I'm not sure how feasible that is, as the name is defined within your testing framework, of which there can be many, and we don't know up front which the end-user is using.