A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/YOU54F/jest-pact-typescript below:

YOU54F/template-jest-pact-typescript: A Pact consumer example written in TypeScript with Jest

Pact Consumer Workflow Example in Typescript with Jest

Validate Pact contract against Swagger spec Set the following env vars for pact publishing Create postman collections from pacts

Note:- There are no tests in the saved postman collections, so it will run the requests, but will not validate the responses are as per the pacts.

TODO

Build your own Pact Stub Service for your pacts in Docker

cd docker/pact-stub-service

Build the base pact image, change the name you54f to your own dockerhub username

The Base image resides at base.Dockerfile which will load the pact ruby standalone, plus a healthcheck endpoint /healthcheck on the containers for use in AWS and other Cloud providers.

make pact_build docker build -t pact-base -f base.Dockerfile . make pact_tag docker tag pact-base you54f/pact-base make pact_push docker push you54f/pact-base

You can then copy your pact files generated with yarn run test into the docker/pact-stub-service/pacts folder that the Dockerfile will use.

copy_pacts rm -rf pacts && cp -r ../../pact/pacts .

Look at the Dockerfile

FROM you54f/pact-base

ARG PACT_FILE

COPY ${PACT_FILE} /pact.json

See the docker/docker-compose.yml file for how to load your pacts into the docker container.

version: "3.1"

services:
  pact-stub-server-json:
    build:
      context: pact-stub-service
      args:
        PACT_FILE: pacts/test-consumer-json-provider.json
    ports:
      - "8080:8080"

You can run it with cd docker && docker-compose up


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4