O'Reilly logo
  • Hsieh Cheng Ying thinks this is interesting:

This happens because our Jest is not aware we are using ES6!

From

Cover of Vue.js 2 and Bootstrap 4 Web Development

Note

babel-jest is now automatically loaded by Jest and fully integrated.

https://github.com/babel/babel-jest

if you saw Couldn't find preset "es2015" relative to directory, just

npm install babel-preset-es2015 --save-dev