DEV Community

Discussion on: Setup jest from scratch in a vanilla js project.

 
manuartero profile image
Manuel Artero Anguita 🟨

Sure!

  • test files are transpiled - by babel:
 transform: {
   '\\.[jt]sx?$': 'babel-jest',
 },
Enter fullscreen mode Exit fullscreen mode

who is in charge of reading cool-js and getting boring-js on return.

  • I'm using a preset (a ready to go) configuration: present-env
presets: ["@babel/preset-env"],
Enter fullscreen mode Exit fullscreen mode

In particular, you may find the babeljs.io/docs/en/babel-preset-en... useful

Thread Thread
 
agassiot profile image
Andrew Gassiot

Ah ok, I see now. And yes, going to babel’s documentation was much more helpful than all the time I’ve spent on Jest documentation.

So babel is just handling everything, then. Thrilled to get the quick and helpful response, but the answer is a total bummer. I kinda figured Jest would be almost fully converted by now