0

I want to use MSW with rollup and web test runner. As soon as I import setupServer and run the test the following error is thrown:

Could not import your test module. Check the browser logs or open the browser in debug mode for more information.
Error while transforming node_modules/msw/lib/node/index.mjs: Could not resolve import "timers".
39 |
40 | // config/polyfills-node.ts
41 | import { setTimeout as nodeSetTimeout } from "timers";
42 | var setTimeout = nodeSetTimeout;
43 |
44 | // src/node/setupServer.ts

I tried rollup-plugin-node-polyfills without success. Any suggestions?

0 Answers0