PactJS:如何使用V3(版本3)匹配器实现“术语”?

问题描述 投票:0回答:1

在版本2中,您可以执行:

.withRequest({
  method: 'GET',
  path: term({
    generate: '/projekt/1',
    matcher: '/projekt/[0-9]+',
  }),
})

matchers from version 3没有term,如何在v3中做到这一点?

matcher pact term contract generate
1个回答
0
投票

更名为regex

 path: regex('/projekt/[0-9]+', '/projekt/1'),
© www.soinside.com 2019 - 2024. All rights reserved.