问题
Is there a Verifier equivalent on the JS Node side? Is it possible to write Rest API test in JS Node that can access the stubs?
回答1:
Currently we don't support the tests generation out of the box. However since sc contract is pluggable (https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html#_pluggable_architecture) there's no problem to write a test generator that will generate a node js test. If that's not acceptable for you you can check out Pact and use their api. SC contract also understands Pact files as contract definition.
As for using stubs you can use the Stun Runner Boot application to download and start stubs that your node js application can use (example https://github.com/marcingrzejszczak/sc-contract-car-rental/blob/master/README.adoc#stub-runner-boot-with-a-nodejs-ap)
来源:https://stackoverflow.com/questions/45828892/spring-cloud-contract-support-for-node-js