Closed ssaket closed 2 years ago
@amerryma Thanks for the answer, but this ain't working as well :(
here's the new error - TypeError: Jest: a transform must export a 'process' function.
I figured it out. While installing @babel/plugin-transform-modules-commonjs
I saw a warning saying I should also install jest-babel
which is not required, removing it solved the problem. Thanks a lot for your help :)
Thanks for the update. I'll try this out myself too!
I have the same issue.
I'm trying to import something to a test file but still get
SyntaxError: Cannot use import statement outside a module.
In my opinion, the issue should be reopened as the problem still occurs on the master branch.
Hi there,
I am using node-fetch api and when I run
yarn run test
, I get the following error:environment
I choose this package/lib because I don't know much about configuration stuff (Jest, node, tsconfig) but apparently I am stuck and can't find any solution. Can you please let me know what am I missing here?