Skip to content

Commit

Permalink
close db in custom _serialize test in get-test.js + fix zalgo
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphtheninja committed Dec 23, 2017
1 parent 060abde commit 6b3090e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions abstract/get-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,19 @@ module.exports.args = function (test) {
})

test('test custom _serialize*', function (t) {
t.plan(2)
var db = leveldown(testCommon.location())
db._serializeKey = function (data) { return data }
db._get = function (key, options, callback) {
t.deepEqual(key, { foo: 'bar' })
callback()
process.nextTick(callback)
}
db.open(function () {
db.get({ foo: 'bar' }, function (err) {
t.error(err)
db.close(function (err) {
t.error(err)
t.end()
})
})
})
})
Expand Down

0 comments on commit 6b3090e

Please sign in to comment.