Dynamic imports (import("foo").then(foo => foo("bar")).catch(()=>console.log("import error")) are actually not supported in Node. As I understand it, these are transpiled to CommonJS imports before running the tests. There may be a need to help people understand how to mock success and failure of these imports in their jest tests.
Dynamic imports (
import("foo").then(foo => foo("bar")).catch(()=>console.log("import error")
) are actually not supported in Node. As I understand it, these are transpiled to CommonJS imports before running the tests. There may be a need to help people understand how to mock success and failure of these imports in their jest tests.