When using jest this code gets transpiled to require and the file URL syntax of the import is not supported and breaks the testing environment.
Why not just use jest's --experimental-vm-modules flag? Glad you asked. Because of this jestjs/jest#11434 (comment) which is caused by this nodejs/node#37648 which is ultimately caused by this v8 bug
When using jest this code gets transpiled to require and the file URL syntax of the import is not supported and breaks the testing environment.
Why not just use jest's --experimental-vm-modules flag? Glad you asked. Because of this jestjs/jest#11434 (comment) which is caused by this nodejs/node#37648 which is ultimately caused by this v8 bug