Skip to main content

Deno Pact

Download Pact FFI Library

  • Checks if it exists in ${HOME}/.pact/ffi/<pact_ffi_version>
  • Downloads the neccessary library for your architecture
  • Executes the library to ensure it works
deno run -A --unstable pact/downloadFfi.ts --run
OS Architecture Supported
OSX x86_64 βœ…
OSX arm βœ…
Linux x86_64 βœ…
Linux arm βœ…
Windows x86_64 βœ…

You can also do this in code

import { downloadFfiForPlatform } from "https://deno.land/x/pact/src/mod.ts";
await downloadFfiForPlatform()

How to use

import { DenoPact } from "https://deno.land/x/pact/src/mod.ts";
import { PactFfi as Pact } from "https://deno.land/x/pact/src/mod.ts";
const denoPact = new DenoPact();

Examples

There is a handy helper script to run the examples

Try ./run help for available commands or take a look at the run script

gRPC Area Calculator

gRPC Greeter

HTTP service - Swagger Mock Validator

Pact Verifications

Docker

You can spin up various services with Docker to help you play around with the pact files generated, and the examples