module-lookup-amd
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -25,2 +25,6 @@ var ConfigFile = require('requirejs-config-file').ConfigFile; | ||
if (typeof config === 'undefined') { | ||
throw new Error('requirejs config missing'); | ||
} | ||
if (typeof config === 'string') { | ||
@@ -27,0 +31,0 @@ configPath = path.dirname(config); |
{ | ||
"name": "module-lookup-amd", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Resolve aliased dependency paths using a RequireJS config", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -51,2 +51,14 @@ var assert = require('assert'); | ||
it('throws if the config is missing', function() { | ||
assert.throws(function() { | ||
lookup(undefined, 'foobar', filename); | ||
}); | ||
}); | ||
it('throws if the config is not a string or object', function() { | ||
assert.throws(function() { | ||
lookup(null, 'foobar', filename); | ||
}); | ||
}); | ||
it('does not throw if the baseUrl is missing', function() { | ||
@@ -53,0 +65,0 @@ var configObject = new ConfigFile(configPath).read(); |
18075
401