top | item 43459552

(no title)

plopz | 11 months ago

The main problem with es modules is mocking in tests. How do people work around that issue?

discuss

order

WilcoKruijer|11 months ago

Define an interface, mock the implementation. How people outside of JS/TS have been doing it for years.

giorgioz|11 months ago

You either use Vitest for new projects or you use jest.unstable_mockModule for old Jest tests

codedokode|11 months ago

You don't use modules as a replacement for DI?