abstract-leveldown
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -11,4 +11,4 @@ /* Copyright (c) 2013 Rod Vagg, MIT License */ | ||
if (typeof location != 'string' || !location.length) | ||
throw new Error('constructor requires a non empty location string') | ||
if (typeof location != 'string') | ||
throw new Error('constructor requires a location string argument') | ||
@@ -15,0 +15,0 @@ this.location = location |
@@ -5,3 +5,3 @@ module.exports.args = function (leveldown, test) { | ||
leveldown | ||
, /constructor requires at least a location argument/ | ||
, { name: 'Error', message: 'constructor requires at least a location argument' } | ||
, 'no-arg leveldown() throws' | ||
@@ -11,3 +11,2 @@ ) | ||
}) | ||
test('test database creation non-string location throws', function (t) { | ||
@@ -18,3 +17,3 @@ t.throws( | ||
} | ||
, /constructor requires a non empty location string/ | ||
, { name: 'Error', message: 'constructor requires a location string argument' } | ||
, 'non-string location leveldown() throws' | ||
@@ -25,16 +24,4 @@ ) | ||
test('test database creation empty string location throws', function (t) { | ||
t.throws( | ||
function () { | ||
leveldown('') | ||
} | ||
, /constructor requires a non empty location string/ | ||
, 'non-string location leveldown() throws' | ||
) | ||
t.end() | ||
}) | ||
test('test database creation non empty string does not throw', function (t) { | ||
var db | ||
t.doesNotThrow(function () { db = leveldown('foo') }) | ||
test('test database open no-arg throws', function (t) { | ||
var db = leveldown('foo') | ||
t.ok(db, 'database object returned') | ||
@@ -44,2 +31,2 @@ t.ok(typeof db.open === 'function', 'open() function exists') | ||
}) | ||
} | ||
} |
{ | ||
"name": "abstract-leveldown", | ||
"description": "An abstract prototype matching the LevelDOWN API", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ "Rod Vagg <r@va.gg> (https://github.com/rvagg)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114613
2664