diff --git a/abstract/approximate-size-test.js b/abstract/approximate-size-test.js index 5fc43d57..8ae2221b 100644 --- a/abstract/approximate-size-test.js +++ b/abstract/approximate-size-test.js @@ -68,6 +68,7 @@ module.exports.args = function (test) { }) test('test custom _serialize*', function (t) { + t.plan(4) var db = leveldown(testCommon.location()) db._serializeKey = function (data) { return data } db._approximateSize = function (start, end, callback) { @@ -78,10 +79,7 @@ module.exports.args = function (test) { db.open(function () { db.approximateSize({ foo: 'bar' }, { beep: 'boop' }, function (err) { t.error(err) - db.close(function (err) { - t.error(err) - t.end() - }) + db.close(t.error.bind(t)) }) }) }) diff --git a/abstract/del-test.js b/abstract/del-test.js index b5ff2505..825cc19e 100644 --- a/abstract/del-test.js +++ b/abstract/del-test.js @@ -42,6 +42,7 @@ module.exports.args = function (test) { }) test('test custom _serialize*', function (t) { + t.plan(3) var db = leveldown(testCommon.location()) db._serializeKey = function (data) { return data } db._del = function (key, options, callback) { @@ -51,10 +52,7 @@ module.exports.args = function (test) { db.open(function () { db.del({ foo: 'bar' }, function (err) { t.error(err) - db.close(function (err) { - t.error(err) - t.end() - }) + db.close(t.error.bind(t)) }) }) }) diff --git a/abstract/get-test.js b/abstract/get-test.js index f5bd9700..755651e4 100644 --- a/abstract/get-test.js +++ b/abstract/get-test.js @@ -43,6 +43,7 @@ module.exports.args = function (test) { }) test('test custom _serialize*', function (t) { + t.plan(3) var db = leveldown(testCommon.location()) db._serializeKey = function (data) { return data } db._get = function (key, options, callback) { @@ -52,10 +53,7 @@ module.exports.args = function (test) { db.open(function () { db.get({ foo: 'bar' }, function (err) { t.error(err) - db.close(function (err) { - t.error(err) - t.end() - }) + db.close(t.error.bind(t)) }) }) }) diff --git a/abstract/put-test.js b/abstract/put-test.js index 36080790..58d9fe75 100644 --- a/abstract/put-test.js +++ b/abstract/put-test.js @@ -64,6 +64,7 @@ module.exports.args = function (test) { }) test('test custom _serialize*', function (t) { + t.plan(4) var db = leveldown(testCommon.location()) db._serializeKey = db._serializeValue = function (data) { return data } db._put = function (key, value, options, callback) { @@ -74,10 +75,7 @@ module.exports.args = function (test) { db.open(function () { db.put({ foo: 'bar' }, { beep: 'boop' }, function (err) { t.error(err) - db.close(function (err) { - t.error(err) - t.end() - }) + db.close(t.error.bind(t)) }) }) })