diff --git a/src/tasks/package.js b/src/tasks/package.js index 83305c9..ae0c900 100644 --- a/src/tasks/package.js +++ b/src/tasks/package.js @@ -78,11 +78,12 @@ module.exports = () => { prepare: 'npm run build', release: 'standard-version', security: 'npm audit', - 'test:only': 'jest', - 'test:watch': 'jest --watch', - 'test:coverage': "jest --collectCoverageFrom='src/**/*.js' --coverage", + 'test:only': 'cross-env NODE_ENV=test jest', + 'test:watch': 'cross-env NODE_ENV=test jest --watch', + 'test:coverage': + "cross-env NODE_ENV=test jest --collectCoverageFrom='src/**/*.js' --coverage", pretest: 'npm run lint', - test: 'npm run test:coverage', + test: 'cross-env NODE_ENV=test npm run test:coverage', defaults: existing.scripts.defaults || 'webpack-defaults', }, files: existing.files || ['dist/', 'lib/', 'index.js'],