Hi, are there plans to allow a consumer project pa...
# pact-js
b
Hi, are there plans to allow a consumer project pass in parameters in it's state (state with-data) for the provider to use to setup it's state? Specifically calling out this feature in pact-jvm:
Copy code
@State("with-data") // Method will be run before testing interactions that require "with-data" state
        public void toStateWithData(Map data) {
            // Prepare service before interaction that require "with-data" state. The provider state data will be passed 
            // in the data parameter
            // ...
            System.out.println("Now service in state using data " + data);
        }
https://github.com/pact-foundation/pact-jvm/tree/master/provider/junit#example-of-http-test
m
(that uses separate provider side feature, but you can see in the consumer test defines the data)
Note the usual warnings about beta etc.
we were a bit stalled on this release based on issues in an upstream package, but that’s unblocked now
so a new beta should be out soon that starts to get closer to the next major release
❤️ 1
b
Thank you Matt!
👍 1