devinekask / generator-devine-boilerplate

⚙ the one and only devine.be boilerplate generator
23 stars 3 forks source link

🐛 Add babel-preset-es2015 for the NODE_ENV=test #34

Closed thibmaek closed 7 years ago

thibmaek commented 7 years ago

Without this Jest will not be able to use import and other features that currently need to be transpiled with babel.

Screenshot failing:

image

Screenshot with changes in this PR applied:

image

Would have seemed logical that setting the global preset es2015 would also take care of Jest, but my guess is since that Jest exports a new env or runs under NODE_ENV=test that this doesn't work. This is one of the reasons Jest 17+ was needed in #31

thibmaek commented 7 years ago

Also, sorry for that commit from pr #33 being here too. Didn't find a way to clear that one out before PR'ing. I made the mistake of adding 1e4f8e7 on my fork's master and this commit on a ft-branch. ☚ī¸

Looks like you can either merge this or #33 and have both changes merged into master.