jmcdo29 / testing-nestjs

A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!
MIT License
2.9k stars 382 forks source link

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

Closed YOU54F closed 1 month ago

YOU54F commented 2 years ago

Is there an existing issue for this?

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

jmcdo29 commented 2 years ago

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.

YOU54F commented 2 years ago

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

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!

omermorad commented 2 years ago

Hi @jmcdo29 @YOU54F,

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

jmcdo29 commented 2 years ago

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?

omermorad commented 2 years ago

@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

YOU54F commented 2 years ago

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

YOU54F commented 1 month ago

Closing this off as I am doing house-keeping with all my open issues and I won't get round to this but would be happy if someone did.

Feel free to reach out to us on https://slack.pact.io or reply in here