Rhiddhi Gupta
Nov 4 · 1 min read

I get the following error:

TypeError: Cannot read property ‘addInteraction’ of undefined

61 | };
62 |
> 63 | await provider.addInteraction(interaction);
| ^
64 | await client().get(apiPath).expect(200);
65 | });
66 |

at Pact.Object.<anonymous>.Pact.addInteraction (node_modules/@pact-foundation/src/httpPact.ts:102:29)
at Object.<anonymous> (src/pact-test/client.pact.spec.ts:63:32)
at node_modules/tslib/tslib.js:110:75
at Object.__awaiter (node_modules/tslib/tslib.js:106:16)
at Object.test (src/pact-test/client.pact.spec.ts:45:65)

● Pact between test-consumer and aws-provider › Client test › Should return an array of clients

TypeError: Cannot read property ‘verify’ of undefined

at Pact.Object.<anonymous>.Pact.verify (node_modules/@pact-foundation/src/httpPact.ts:113:8)
at Object.<anonymous> (node_modules/jest-pact/index.js:21:45)

Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 15.882s, estimated 17s
Ran all test suites.

    Rhiddhi Gupta

    Written by