'constructor with only function argument uses factory': function (done) { var db = levelup(MemDOWN) assert.isNull(db.location, 'location property is null') db.on('open', function () { assert(db.db instanceof MemDOWN, 'using a memdown backend') assert.same(db.db.location, '', 'db location property is ""') db.put('foo', 'bar', function (err) { refute(err, 'no error') db.get('foo', function (err, value) { refute(err, 'no error') assert.equals(value, 'bar', 'correct value') done() }) }) }) }