Search code examples
pact

Pact vs PactWeb?


I'm trying to use pact in an angular environment, with karma + jasmine test.

Looking for setup samples, I found two packages @pact-foundation/pact and @pact-foundation/pact-web. Both contain the same doc, version and git repo link.

Most of the sample seem to use

import { Pact } from '@pact-foundation/pact';

But some use

import { PactWeb } from '@pact-foundation/pact-web';

I didn't find any doc about PackWeb but karma/jasmine samples use it in pact github.

So, can someone explains what the difference ?

Thanks


Solution

  • Pact-web works in non-node based environments - e.g. Karma and Jasmine.

    See our readme for more. https://github.com/pact-foundation/pact-js/blob/master/README.md#using-pact-in-non-node-environments