Change your export method
foo1 is the same as foo2
// foo1.ts async function foo1() { return {}; } export default { foo1 }; // bar.test.ts import foos1 from './foo1.js'; await foos1.foo1();