If I run a build locally with npm run build, it will create a local copy of _esm. If I later run the tests, it will also read the tests on the _esm folder, which is the build folder.
See this example
✓ src/utils/fees.test.ts (24 tests) 2ms
✓ _esm/utils/fees.test.js (24 tests) 2ms