Skip to content

Explicitly set test NODE_ENV for running tests on Travis#1378

Merged
outoftime merged 1 commit intopopcodeorg:masterfrom
outoftime:travis-node-env
Mar 4, 2018
Merged

Explicitly set test NODE_ENV for running tests on Travis#1378
outoftime merged 1 commit intopopcodeorg:masterfrom
outoftime:travis-node-env

Conversation

@outoftime
Copy link
Copy Markdown
Contributor

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.

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.
@outoftime outoftime merged commit 2017535 into popcodeorg:master Mar 4, 2018
@outoftime outoftime deleted the travis-node-env branch March 4, 2018 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant