Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Writing jest test cases for a MongoDB server app.
I noticed, inside the testEnvironment file, it uses ‘require’ instead of ‘import’.
I changed it to ‘import’...🤔
Somehow it pops out syntaxErrors.🤦♂️
In my actual .test.js file, I use import all the time, never had any issue.
The Babel transform and babel-jest are also in the right place.
Anyone know why?
question
babel
es2015
jest
testing
es6