Hi, I'm not sure which channel is the best to ask...
# pact-rust
t
Hi, I'm not sure which channel is the best to ask this question, so I asked here. If there are no provider states (in pact-js, set
states: []
, not sure about other language, maybe not calling
given()
), pact verifier will still call provider to setup/teardown with empty state (
""
) https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_verifier/src/lib.rs#L599 Is this intended? I think it's a bit weird.
m
Yes, it was a feature request. It allows you to setup before/after hooks in the test cycle
t
Thanks. So in case there are absolutely nothing to setup/teardown, I think it's a bit better to set
states: [{ description: 'Nothing to setup/teardown' }]
than
states: []
, because: • In both cases, we need to create provider state handler anyway. • The one with description is more clearer.