pact-foundation / nestjs-pact

Injectable Pact.js Consumer/Producer for NestJS
MIT License
49 stars 14 forks source link

Create canonical examples for NestJS-Pact #20

Open YOU54F opened 1 year ago

YOU54F commented 1 year ago

Examples for Pact projects, and workshops use a canonical Product API scenario described here

Currently examples for NestJS-Pact exist

Tasks

  1. Create standalone example-consumer-nestjs-pact project from example-consumer https://github.com/pactflow/example-consumer/tree/master/src
  2. Create standalone example-provider-nestjs-pact project from example-consumer https://github.com/pactflow/example-provider/tree/master/src
  3. Uplift consumer example from pact-js https://github.com/pact-foundation/pact-js/tree/master/examples/nestjs-consumer
  4. Uplift provider example from pact-js https://github.com/pact-foundation/pact-js/tree/master/examples/nestjs-provider
  5. Copy/Add example consumer/provider projects to https://github.com/jmcdo29/testing-nestjs
  6. Add to docs.pactflow.io examples list
  7. Add to docs.pact.io recipes list
YOU54F commented 1 year ago

E2E Consumer/Provider Examples

Based on V2 Pact Specification, and Pact-JS V2 interface

Pact-JS v9

Pact-JS v9.18.1 NestJS-Pact v2.2.2

https://github.com/YOU54F/nestjs-pact-test/tree/main/v2_spec/pactjs_v9_nestjspact_v2

Pact-JS v10+

Pact-JS v10.4.0 NestJS-Pact v2.3.0

https://github.com/YOU54F/nestjs-pact-test/tree/main/v2_spec/pactjs_v10_nestjspact_v3

Based on V3 Pact Specification, and Pact-JS V3 interface

Pact-JS v10+

Pact-JS v10.4.0 @you54f/NestJS-Pact v3.1.0 - Based on changes in PR

https://github.com/YOU54F/nestjs-pact-test/tree/main/v3_spec/pactjs_v10_nestjspact_v3