GithubHelp home page GithubHelp logo

evaluate-pact's Introduction

Playground for PACT contract testing

A basic test playground with 3 consumers and a single provider. The consumers have different expectations to the same provider.

Issues

At the moment there is an issue with a dependency used by @pact-foundation/pact with package make-error-cause. I was only able to change the issue manually in the package manually.

unclear topics and findings

  • API of the package is cumbersome and not really modern JS like
  • no support for running with pure relative path definitions
    • have to expose the host + port to process env and have to change impl details to make it work see TODO in useService
  • making integration tests with a component that can call with different query params results in failed provider test as the consumer test response has only 1 entry in the array and the provider response with more this details shall not matter in my opinion.

Commands

Install

yarn

Fix make-error-cause package

This is a temporary change that gets resetted every time a yarn command is executed, like add install etc.

  • open ./node_modules/make-error-cause/dist/index.js
  • comment line 12
  • save

running test commands

start local pact-broker
docker-compose up

open browser http://localhost:9292

run consumers tests
yarn test:consumers
publish pacts to broker
yarn pact:publish
run provider tests
yarn test:provider

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.