Kwo Ding
10/19/2022, 8:33 AMwindow.msw.worker (react app started with msw mocks) to the setupPactMswAdapter but getting the following error:
TypeError: mswMocker.events.on is not a function
at ../node_modules/@pactflow/pact-msw-adapter/dist/pactMswAdapter.js:39
37 | const activeRequestIds = []; // Pending requests which are still valid
38 | const matches = []; // Completed request-response pairs
> 39 | mswMocker.events.on("request:match", (req) => {Kwo Ding
10/19/2022, 8:36 AMconst worker: any = await page.evaluate('window.msw.worker');
const pactMswAdapter = setupPactMswAdapter({
worker,
options: {
consumer: "theConsumer",
providers: {
["someProviderService"]: ["/endpoint"],
},
debug: true,
},
});Yousaf Nabi (pactflow.io)
Slackbot
10/19/2022, 11:12 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Timothy Jones
10/19/2022, 12:09 PMKwo Ding
10/19/2022, 2:53 PMKwo Ding
10/20/2022, 6:33 AMKwo Ding
10/20/2022, 7:43 PMyarn run example:test:playwrightYousaf Nabi (pactflow.io)
Kwo Ding
10/21/2022, 12:22 PM