env-check

0.0.1 • Public • Published

env-check

Fail-fast with a helpful error message when required environment variables haven't been defined. For example, if you run your browser tests on SauceLabs with a command like this:

"test:saucelabs""karma start karma-saucelabs.conf.js"

you could additionally ensure you fail-fast if the requisite SAUCE_ACCESS_KEY isn't defined by modifying the command to this:

"test:saucelabs""envcheck SAUCE_ACCESS_KEY && karma start karma-saucelabs.conf.js"

Here, a non-zero exit code and the following message would be shown if SAUCE_ACCESS_KEY isn't defined:

Error: Missing environment variable SAUCE_ACCESS_KEY.

You can provide as many environment variables to check as you like.

Package Sidebar

Install

npm i env-check

Weekly Downloads

3

Version

0.0.1

License

ISC

Last publish

Collaborators

  • dchambers