Hi! I'm currently trying to set up Consumer Drive...
# pact-js
n
Hi! I'm currently trying to set up Consumer Driven Contract testing for a consumer in js who consumes kafka messages. I can't really figure out how to correctly include metadata of a message (e.g. headers). I tried to write a consumer test using the js tooling based on the example project (https://github.com/pactflow/example-consumer-js-kafka), but I do not seem to be able to correctly set matchers for the metadata in the DSL. The consumer pact validation (messageConsumerPact...verify(asynchronousBodyHandler(...))) also appears to only send the body to the handler I provide to the asynchronousBodyHandler, so I can't properly test it. I was able to manually write a contract that contains metadata matchers and also able to verify that the provider correctly consumes the contracts. So I am confident that this use case is supported. Has anybody got experience with this? Am I overlooking the correct part of the DSL?
m
Mind raising a feature request? I'd need to double check, it's possible the API doesn't allow matchers for the metadata and it might not pass to the handler