Hi, I am trying to save a uuid in my provider side...
# pact-js
l
Hi, I am trying to save a uuid in my provider side verification, where this is saved in provider states, in order to do this I have to match the uuid that I pass in my consumer tests, I was wondering if this uuid can be dynamic, do I do not have to match it, thought the term() matcher would help but it did not work like so
Copy code
.withRequest({
          method: 'GET',
          path: term({
            generate: '/user/9ae9b264-f181-46ea-a468-4919c48fbe94',
            matcher:
              '/user/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
          }), // we want to be strict with what we send out <https://docs.pact.io/getting_started/matching#request-matching>
          headers: {
            Accept: 'application/json, text/plain, */*',
            Authorization: string('Bearer testToken')
          }
        })
when I save a different uuid setup in the provider side the verifaction fails, any tips on how to achieve this, read about provider state injected values, but it does not seem to be yet implemented in pact-js?
👀 1
m
(you’re right, it’s not in the current mainline, but is in the beta)
l
Alright, thanks
👍 1