Search code examples
javascriptunit-testingpact

Can't generate params in state (PACT-testing problem)


I use @pact-foundation/pact@latest (for quick deployment of my case there is a simple jest example)

Using this code: enter image description here

I have generated this PACT file: enter image description here

It is generated according to specification 3 (these are settings): enter image description here

Problem:

How can I make the final PACT file contains state params? Like this: enter image description here

Here is an example. Here just providerStates. But I would like to get it through the official PACT library.


Solution

  • This is not yet possible. Pact JS does not yet support the full feature set of pact spec v3. See https://docs.pact.io/feature_support for featur coverage across languages.