Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "assert-env", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Assert that specific environment variables exist.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
17
test.js
@@ -25,3 +25,3 @@ 'use strict'; | ||
test('assert', function (t) { | ||
test('throws when missing keys', function (t) { | ||
process.env.HTTP_LISTEN_PORT = 4242; | ||
@@ -38,1 +38,16 @@ | ||
}); | ||
test('does not throw when all keys exist', function (t) { | ||
process.env.HTTP_LISTEN_PORT = 4242; | ||
process.env.HTTP_LISTEN_HOST = '0.0.0.0'; | ||
var fn = simulate([ | ||
'HTTP_LISTEN_PORT', | ||
'HTTP_LISTEN_HOST' | ||
]); | ||
assert.doesNotThrow(fn, ReferenceError); | ||
t.end(); | ||
}); | ||
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
5236
75
4