KeoooDev
08/30/2024, 10:46 AMMatt (pactflow.io / pact-js / pact-go)
Service or as its role as the consumer of Intercom ?
The question is valid, and you can run a Pact test in this situation (but just note that you’re unlikely to be able to do a provider verification test of it. If you have an OAS for that provider, you could use that in a BDCT test (see also https://docs.pactflow.io/docs/bi-directional-contract-testing if you’re using PactFlow)Matt (pactflow.io / pact-js / pact-go)
KeoooDev
09/02/2024, 11:18 AMIn terms of mocking axios, do you need to mock axios itself or do you have an internal API client you can mock directly? are you using an Intercom SDK or directly talking to their APIs?Thank you for your reply! So im directly calling there API from my backend service and satanising the data a bit before returning it. It would be nice for me to skip the api call when my provider runs and I can add some mock data instead of me calling the intercom api every time I run the provider tests.
Matt (pactflow.io / pact-js / pact-go)
nock to mock that callKeoooDev
09/02/2024, 11:36 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
KeoooDev
09/02/2024, 11:39 AM