Joel Whalen
10/11/2023, 7:41 PM➜ pact-msw-adapter git:(main) yarn run example:link
yarn run v1.22.19
$ cd examples/react && yarn link @pactflow/pact-msw-adapter
warning package.json: No license field
error No registered package found called "@pactflow/pact-msw-adapter".
Joel Whalen
10/11/2023, 8:27 PM.vscode/launch.json
if you've gotten this to work?Joel Whalen
10/13/2023, 3:19 PMJoel Whalen
10/13/2023, 3:29 PMJoel Whalen
10/13/2023, 7:13 PMyarn install
and then `yarn test ./src/pactFromMswServerGql.msw.spec.ts`; notice how there aren't any requests being matched at all? Not even with { onUnhandledRequest: 'error' }
set in the msw server? The closest issue I could find says the problem is in how the Apollo Client is setup, but you can see I'm passing in node-fetch
to the client just fine in graphqlClient.ts
. I'd like to write the logic for handling gql, but msw isn't seeing any requests, which means I cannot write any handlers for it yet. ThanksJoel Whalen
10/16/2023, 6:07 PMPASS src/pactFromMswServerGql.msw.spec.ts
API - With MSW mock generating a pact
✓ should get all books (34 ms)
now to write and test the pactfileJoel Whalen
10/17/2023, 4:09 PMyarn install
yarn test ./src/pactFromMswServerGql.msw.spec.ts
Joel Whalen
10/23/2023, 6:21 PMDale
01/29/2024, 10:49 AM<https://base-url.com/service/v2/price/>
. The tests run, and the pact file is generated. The path property for each endpoint defined as follows: "path": /service/v2/price/
On the provider side, the path in the OAS doc is displayed simply as /price/
(without the leading /service/v2/
).
My problem:
The can-i-deploy
step fails due to the endpoint /service/v2/price/
not existing in the provider spec. Strictly true, but I’d like to get rid of the leading /service/v2/
. Can I do this programmatically?Dale
03/13/2024, 4:15 PM[pact-msw-adapter] Adapter enabled
when I run my tests?