Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close dbs #167

Merged
merged 9 commits into from
Dec 23, 2017
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

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