magic-akari/swc_mut_cjs_exports

Can't get tests to run to provide repro of bug

gpeal opened this issue · 0 comments

gpeal commented

I'm trying to create a test case in this repo for a bug we're hitting. It has something to do with a circular dependency doing a re-export. The bug is something along the lines of the source from emit_export_stmts being moved from the very top of the file to below its imports which will eventually lead to an import returning undefined.

However, when I try to clone this repo, install deps, and run tests, I get this for every test:

 FAIL  __test__/case_10/index.spec.ts
  ● Test suite failed to run

    index not found

      at Compiler.transformSync (node_modules/.pnpm/@swc+core@1.3.78/node_modules/@swc/core/index.js:241:29)
      at transformSync (node_modules/.pnpm/@swc+core@1.3.78/node_modules/@swc/core/index.js:348:21)
      at Object.process (node_modules/.pnpm/@swc+jest@0.2.26_@swc+core@1.3.78/node_modules/@swc/jest/index.js:73:45)
      at ScriptTransformer.transformSource (node_modules/.pnpm/@jest+transform@29.5.0/node_modules/@jest/transform/build/ScriptTransformer.js:542:31)
      at ScriptTransformer._transformAndBuildScript (node_modules/.pnpm/@jest+transform@29.5.0/node_modules/@jest/transform/build/ScriptTransformer.js:671:40)
      at ScriptTransformer.transform (node_modules/.pnpm/@jest+transform@29.5.0/node_modules/@jest/transform/build/ScriptTransformer.js:723:19)

Is this something you've seen?