#1113 Pact doesn't display any useful errors when actual and expected requests are different
Issue created by
satishautade
Software versions
•
OS: Mac OSX 13.4.1
•
Consumer Pact library: Pact JS v3
•
Provider Pact library: N/A
•
Node Version: v18.14.2
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 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
Log level INFO. When the actual consumer request is different from the request specified in pact mock provider, the pact should show useful error highlighting the mismatch.
Actual behaviour
Log level INFO. When the actual consumer request is different from the request specified in pact mock provider, the pact just fails without any useful information about the differences.
[12:20:00.532] ERROR (97438): pact@12.1.0: Test failed for the following reasons:
Mock server failed with the following mismatches:
0) The following request was incorrect:
GET /dogs
RUNS __tests__/simple-example.pact.js
Steps to reproduce
1. Clone this example repo
https://github.com/satishautade/pact-bug
2. Run npm install && npm test in the root directory of this project.
Relevant log files
Attached the log file of the same test by re-running it in DEBUG mode.
pact-failure-debug-log.log
pact-foundation/pact-js