Comparing version 0.0.1 to 0.0.2
'use strict'; | ||
var nodeenv = function (environment, callback) { | ||
if (!environment) { throw new Error('environment is missing.'); } | ||
if (environment === undefined) { throw new Error('environment is missing.'); } | ||
if (!callback) { throw new Error('callback is missing.'); } | ||
@@ -6,0 +6,0 @@ |
{ | ||
"name": "nodeenv", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "nodeenv enables tests to control the NODE_ENV variable.", | ||
@@ -5,0 +5,0 @@ "author": "Golo Roden <golo.roden@thenativeweb.io> (http://www.thenativeweb.io)", |
@@ -18,2 +18,8 @@ 'use strict'; | ||
test('does not throw an exception if an empty NODE_ENV value is given.', function () { | ||
assert.that(function () { | ||
nodeenv('', function () {}); | ||
}, is.not.throwing()); | ||
}); | ||
test('throws an exception if no callback is given.', function () { | ||
@@ -20,0 +26,0 @@ assert.that(function () { |
5175
115