Skip to content

Commit f22ff05

Browse files
author
Mat Brown
committed
Explicitly set test NODE_ENV for running tests on Travis
Based on exceptions that Bugsnag is reporting, it seems like the tests on Travis are being run with a `NODE_ENV` of production, even though the Karma configuration should be propagating `test` through the Webpack env plugin. Anyway, it’s probably more sensible to just explicitly set the environment variable when running tests. We do keep the env variable set to `production` for the rest of the Travis run since that’s the correct value for building the production bundle that’s going to get deployed.
1 parent c6e1a2a commit f22ff05

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ before_script:
3434
- sh -e /etc/init.d/xvfb start
3535
script:
3636
- yarn check
37-
- yarn test
37+
- NODE_ENV=test yarn test
3838
- gulp build
3939
- eslint --no-eslintrc --env es5 dist
4040
- bundlesize

0 commit comments

Comments
 (0)