Comparing version 0.1.0 to 0.1.1
@@ -15,2 +15,6 @@ 'use strict'; | ||
function parse (id) { | ||
if (!id) { | ||
throw new TypeError('`id` must be a string.'); | ||
} | ||
var match = id.match(REGEX_PARSE_ID); | ||
@@ -17,0 +21,0 @@ var name = match[1]; |
{ | ||
"name": "neuron-pkg", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Parses neuron package id into name, version and path.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -74,1 +74,14 @@ 'use strict'; | ||
}); | ||
describe("error", function(){ | ||
it("should throw error if id is not a string", function(){ | ||
var error; | ||
try { | ||
pkg(); | ||
} catch(e) { | ||
error = e; | ||
} | ||
expect(error).not.to.equal(); | ||
}); | ||
}); |
5556
120