testing-nestjs icon indicating copy to clipboard operation
testing-nestjs copied to clipboard

[NEW TEST] - (Contract Testing) - Incorporate NestJS Consumer Driven Contract testing with nestjs-pact

Open YOU54F opened this issue 3 years ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Feature Test To Be Requested

Hey,

Great repo <3

The member of the Pact OSS community recently developed with a NestJS Pact adapter to allow for easy consumer driven contract testing with Pact in a NestJS project.

You can see the repo here https://github.com/omermorad/nestjs-pact

and find our how Pact and Consumer Driven Testing works here

I would be happy to work on the examples.

cc: @omermorad

YOU54F avatar Apr 27 '22 14:04 YOU54F

I'd love to see an example and PR to the repo for this! I recently started using pactum instead of supertest for my personal tests and have absolutely loved it. I'd be excited to see what an example for Pact looks like.

jmcdo29 avatar Apr 27 '22 14:04 jmcdo29

Hey @jmcdo29

Awesome! Yeah I have seen pactum, and love what they are doing, great to see the open Pact specification being used by other parties <3

Couple of links to our nestjs examples from our pact-js implementation

  • https://github.com/pact-foundation/pact-js/tree/master/examples/nestjs-consumer
  • https://github.com/pact-foundation/pact-js/tree/master/examples/nestjs-provider

Will look to get an example in but juggling many things at the moment, so won't be immediate, but I've got this to track.

If anyone wants to help out, the examples above and the readme https://github.com/omermorad/nestjs-pact should possibly provide enough of a cookie trail.

Excited to get involved buddy!

YOU54F avatar Apr 27 '22 14:04 YOU54F

Hi @jmcdo29 @YOU54F,

Happy to see that! Did you see that I've added nestjs-pact to the list here in the repo?

omermorad avatar Apr 27 '22 15:04 omermorad

Hi @jmcdo29 @YOU54F,

Happy to see that! Did you see that I've added nestjs-pact to the list here in the repo?

I'm sorry @omermorad, where do you add it?

jmcdo29 avatar Apr 27 '22 15:04 jmcdo29

@jmcdo29 sorry, I thought we are talking about awesome-nestjs repo, and I meant that nestjs-pact is under the list of test utils there

omermorad avatar Apr 28 '22 13:04 omermorad

nice, I hadn't seen that list. Added a badge 😎 https://github.com/nestjs/awesome-nestjs/pull/214

YOU54F avatar Apr 28 '22 13:04 YOU54F