Hello!
I consider to use Playwright Test for unit&integration tests and I am currently reviewing what is missing compared to "traditional" unit test frameworks like Jest.
One thing Jest provides is an API to mock CJS modules loaded by the subject under test, via jest.mock(...). In essence, it is possible to replace the thing returned by require function calls.
Now I tried to set up testdouble in my Playwright Test setup to do the same thing, but I just can't get it to work.
So what I wonder is: Does Playwright Test use some sort of custom loader for CJS/ESM modules that prevents such module-mock libraries (like testdouble, proxyquire, etc.) to work?
Related: #14268