Skip to content

Commit

Permalink
put back t.plan() in custom _serialize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphtheninja committed Dec 23, 2017
1 parent deb5e5e commit 77fe1c7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
6 changes: 2 additions & 4 deletions abstract/approximate-size-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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))
})
})
})
Expand Down
6 changes: 2 additions & 4 deletions abstract/del-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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))
})
})
})
Expand Down
6 changes: 2 additions & 4 deletions abstract/get-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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))
})
})
})
Expand Down
6 changes: 2 additions & 4 deletions abstract/put-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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))
})
})
})
Expand Down

0 comments on commit 77fe1c7

Please sign in to comment.