People complain that ESM makes testing impossible, because you can't mock modules.
You don't need to. Don't use global instances instead and inject dependencies.
#JavaScript #TDD
People complain that ESM makes testing impossible, because you can't mock modules.
You don't need to. Don't use global instances instead and inject dependencies.
#JavaScript #TDD