When Playwright met PollyJS...
The Beginning:
Hi there,
I recently worked on building an E2E testing framework with the only objective in my mind - "I want to write E2E tests fast. Very fast."
I am sharing my approach and learnings in this blog post. This approach is amalgam of 2 ...
sagarpreet.in9 min read
Hi! I tried to follow the steps, but it seems Chapter 4.
I tried to reproduce the steps, but I get the following error:
TypeError: Invalid value used as weak map key at WeakMap.set (<anonymous>) 4 | import FSPersister from "@pollyjs/persister-fs"; 5 | > 6 | Polly.register(NodeHttpAdapter); | ^ 7 | Polly.register(FSPersister); 8 | 9 | let recordIfMissing = true; at WeakMap.<anonymous> (../node_modules/core-js/library/modules/_collection.js:40:34) at Function.set [as register] (../node_modules/@pollyjs/core/src/polly.js:122:28) [...]It seems to be an issue with newer library version, the only one that I could work with was 5.1.1, which is the one PollyJs uses in their typescript-jest-node-fetch example.
Sadly, that version is now too old and won't work with newer versions of ECMA modules (it uses ES5).
Have you had any luck running the steps you followed with newer versions of PollyJs (6.0.0+)? Have you considered sharing the code you used for this post in a Github repository?