abstract-nosql
Version:
An abstract prototype for nosql database with sync and streamable (LevelDOWN API)
20 lines (18 loc) • 584 B
JavaScript
module.exports.args = function (leveldown, test) {
test('test database creation non-string location throws', function (t) {
t.throws(
function () {
leveldown({})
}
, { name: 'InvalidArgumentError', message: 'constructor requires a location string argument' }
, 'non-string location leveldown() throws'
)
t.end()
})
test('test database open no-arg throws', function (t) {
var db = leveldown('foo')
t.ok(db, 'database object returned')
t.ok(typeof db.open === 'function', 'open() function exists')
t.end()
})
}