Fix jest failing on transpilation

This commit is contained in:
Marvin Hagemeister 2018-12-04 20:01:20 +01:00
parent 1f23940fac
commit 0403f129ae
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ module.exports = {
'@babel/preset-env',
{
loose: true,
modules: process.env.BABEL_ENV === 'test' ? 'commonjs' : 'auto',
targets: {
node: 'current',
},

View File

@ -12,7 +12,7 @@
"prepare": "npm run -s build",
"prepare:babel": "babel src/*.js -d dist && npm t",
"lint": "eslint src",
"test": "npm run -s lint && npm run -s build && jest",
"test": "npm run -s lint && npm run -s build && BABEL_ENV=test jest",
"release": "npm run -s prepare && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
},
"repository": "developit/microbundle",