Hi, I'm doing a POC on pactflow for js with SQS. T...
# pact-js
d
Hi, I'm doing a POC on pactflow for js with SQS. The sample I'm following https://github.com/pactflow/example-consumer-js-sns/blob/master/__tests__/unit/handlers/product.service.pact.test.js. But everything is not very clear to me. Can anyone please help me. Thanks
m
How can we help?
I'd suggest reading the section on non-http testing at docs.pact.io and also the YouTube videos on how it works, which includes message pact.
There is also a series of AMAs (can find on the docs) and one talks about how to do this sort of testing
d
Hey Matt, I'm new to Pact flow as well on SQS and Js. did not get the below code block:
describe("product event handler", () => { const messagePact = new MessageConsumerPact({ consumer: "pactflow-example-consumer-js-sns", dir: path.resolve(process.cwd(), "pacts"), pactfileWriteMode: "update", provider: process.env.PACT_PROVIDER ? process.env.PACT_PROVIDER : "pactflow-example-provider-js-sns", logLevel: "info", });
I'm trying to map the same with my service
is there any other github example available for this?
m
What language are you comfortable with writing unit tests in?
d
java but I want to do the POC in JS.
m
There is a java example (howtoexamples)
s
m
I'm just heading to bed but will check-in tomorrow
See how you go with the above resources to start with
d
Thanks