UNPKG

584 BJavaScriptView Raw
1module.exports.args = function (leveldown, test) {
2 test('test database creation non-string location throws', function (t) {
3 t.throws(
4 function () {
5 leveldown({})
6 }
7 , { name: 'InvalidArgumentError', message: 'constructor requires a location string argument' }
8 , 'non-string location leveldown() throws'
9 )
10 t.end()
11 })
12
13 test('test database open no-arg throws', function (t) {
14 var db = leveldown('foo')
15 t.ok(db, 'database object returned')
16 t.ok(typeof db.open === 'function', 'open() function exists')
17 t.end()
18 })
19}