GitHub
09/06/2023, 3:01 AM ~/Documents/projects/open/pact-bug/ npm test
> pact-bug@1.0.0 test
> jest __tests__/ --runInBand
RUNS __tests__/simple-example.pact.js
RUNS __tests__/simple-example.pact.js
2023-09-06T02:20:00.525252Z INFO tokio-runtime-worker pact_mock_server::hyper_server: Received request GET /dogs
2023-09-06T02:20:00.526028Z INFO tokio-runtime-worker pact_matching: comparing to expected HTTP Request ( method: GET, path: /dogs, query: None, headers: Some({"Accept": ["application/json"], "Host": ["localhost"]}), body: Missing )
[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
2023-09-06T02:20:00.536053Z INFO tokio-runtime-worker pact_mock_server::hyper_server: Received request GET /cats
2023-09-06T02:20:00.536094Z INFO tokio-runtime-worker pact_matching: comparing to expected HTTP Request ( method: GET, path: /cats, query: Some({"catId[]": ["1", "1"]}), headers: Some({"Accept": ["application/json"]}), body: Missing )
2023-09-06T02:20:00.537772Z INFO tokio-runtime-worker pact_mock_server::hyper_server: Request matched, sending response
2023-09-06T02:20:00.540438Z WARN ThreadId(02) pact_models::pact: Note: Existing pact is an older specification version (V3), and will be upgraded
FAIL __tests__/simple-example.pact.jsdId(02) pact_models::content_types: Failed to parse 'application/json, application/json' as a content type: mime parse error: an invalid token was encountered, 2C at position 16
Dogs API
✕ returns a successful body (30 ms)
Cats API
✓ returns a successful body (10 ms)
● Dogs API › returns a successful body
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 0 total
Time: 0.619 s, estimated 1 s
Steps to reproduce
1. Checkout this test repo : https://github.com/satishautade/pact-bug
2. Set the log level to INFO and run npm install && npm test
3. Now set it to DEBUG and run npm install && npm test
Relevant log files
pact-failure-debug-log.log
pact-foundation/pact-js