Teddy Morin
05/30/2023, 11:44 AMMessageConsumerPact :
pact = new MessageConsumerPact({
consumer: '<consumer-name>',
dir: path.resolve(process.cwd(), 'pacts'),
pactfileWriteMode: 'merge',
provider: '<provider-name>',
logLevel: 'info',
});
Would appreciate some help 🙏Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
I have two test suites, one for unit tests (that don’t use pacts), and another specifically for pacts.I tend to keep them separate. One of the benefits is that you can use code coverage tools to get some idea of what code paths are tested with Pact
Teddy Morin
05/30/2023, 12:02 PMMatt (pactflow.io / pact-js / pact-go)
Does that mean you have some overlap between your unit and pact test suites? Or some cases are not covered by unit tests but tested by Pact tests?Yes that can happen. I wouldn’t be too concerned about it, but I think the visibility you get by separating things out helps. I’d expect unit tests to overlap with Pact tests pretty significantly, as Pact tests (generalization) tend to be slighly higher up the testing stack than unit tests, albeit you want that “unit test” mentality.
Teddy Morin
05/30/2023, 2:43 PM