pact-foundation / jest-pact

A Pact adaptor for to allow you to easily run tests with Jest
https://pact.io
MIT License
81 stars 12 forks source link

Pact js v3+master #210

Closed YOU54F closed 2 years ago

YOU54F commented 2 years ago

This isn't intended for release at the moment, was just merging in the main branch changes to try and get them in sync (as it looks like we export both the original and v3 interfaces in this branch.

I came across a couple of issues

  1. Issue with the types here https://github.com/pact-foundation/jest-pact/compare/pact-js-v3+master?expand=1#diff-d14d2e9753b6468a5948e742f0d6b7a1c31dd24ebed4c12dd1ec5574722e2467R46

  2. Running npm run dist locally is failing for me on the following type

> jest-pact@0.9.3-beta.v3 build
> rimraf dist && tsc --project tsconfig.dist.json

node_modules/@pact-foundation/pact/src/dsl/verifier/proxy/types.d.ts:1:8 - error TS1259: Module '"/Users/saf/dev/pactoss/jest-pact/node_modules/@types/express/ts4.0/index"' can only be default-imported using the 'esModuleInterop' flag

1 import express from 'express';
         ~~~~~~~

  node_modules/@types/express/ts4.0/index.d.ts:118:1
    118 export = e;
        ~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

Found 1 error.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.