Hi team, I'm wondering if it's possible to impleme...
# protobufs
b
Hi team, I'm wondering if it's possible to implement pact with grpc using pact-js? From what I can gather the plugin is not yet supported by pact-js and I cannot see any examples that do not utilise the plugin
y
pact-js supports v4 in beta, there is a plug-in example, you can use the pact-protobuf-plugin for grpc
b
Is it possible to link the plugin example, I've had trouble finding one for pact-js?
y
in the examples folder in the pact-js repo under v4 subfolder, sorry i am on phone atm
there are provider examples in the folder too
b
These are fantastic! Thanks Yousaf
y
pleasure my mate, let us know how you get on
👍 1
b
QQ Yousaf, we use Jest throughout our project. Do you know if there are plans to update
jest-pact
to include a v4 dist?
y
I’d really love to deprecate jest-pact, and by way of virtue mocha-pact and instead utilise pact-js directly. We don’t have the same lifecycle methods to worry about compared to spinning up a standalone process (as per the Ruby impl). I’d be happy to consider PR’s to update jest-pact but it isn’t hugely high on my priority list to do myself. My next mission is pact-python v3/v4 + plugins with the FFI and review of all the pact-php progress towards the FFI migration
I haven’t discussed the potential deprecation with anyone yet, so I am just noodling
We did have some feedback on the v3 dsl in jest-pact https://github.com/pact-foundation/jest-pact/issues/215 which gave consideration to the change in lifecycles.
b
Yes I see. I'd also like to use pact-js directly. Is that possible at this current moment? Or should I switch to using mocha for the time being?
y
yeah, its grand to use pact-js directly, there are some vanilla jest examples in the repo but here is a pretty simple one which exercises all the matchers https://github.com/YOU54F/pact-matchers/blob/main/pact-js-v3-v10/matchers.v3.pact.test.js
b
Magic. Thanks again Yousaf!
Hey @Yousaf Nabi (pactflow.io) 👋 Appreciate all the help in getting started. I've got a flow working with our solution! It's manual at the moment though and I'd like to hook it up to the CI and the broker. I mostly know what I'm doing here as I've done it before but one part I'm unsure on is the plugin itself. For local dev I installed through the cli, but what's the best to do this for a CI solution using github actions?
y
they are all used in our CI runs 🙂
b
Ideal, ta much 🙂