maybe it's a case of doing `fromProviderState('/${...
# pact-js
u
maybe it's a case of doing
fromProviderState('/${anIdHere}/extra/stuff/${anotherId}', '/' + UUID1 + '/extra/stuff/' + UUID2)
?
t
I’m not sure, but this definitely won’t be right
It’s possible that this isn’t supported. I’d wait for a maintainer, but I would guess it would be either of: 1) Not supported in the DSL yet 2) You provide an object like
{ anIdHere: UUID1, anotherId: UUID2 }
3) Possibly an array
[UUID1, UUID2]
Ah, apologies. I think you were right. The syntax is:
Copy code
fromProviderState(<string that gets parsed>, <example string with replacements>)
Whatever the answer is, there is probably a documentation change needed here
👍 1
m
Calling @uglyog, he’s the creator of this radical feature…
u
I suspect this is "right" in that the example is not an example value (AFAICS) of the variable but rather of the path itself
👍 1
(still debugging things btw - stay tuned for updates)
u
Tim is correct, the two values are the expression to use on the provider side, and the example value to use on the consumer side.
👍 1
u
thanks for your replies, my debugging of things seem to align with your comments, much appreciated
m
Thanks Ron. I also realised I misread this thread in the first place. Sorry team