diff --git a/package.json b/package.json index 448be590..4e44a820 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "concat-stream": "~2.0.0", "coveralls": "~3.0.2", "delayed": "~1.0.1", - "encoding-down": "^5.0.0", + "encoding-down": "^6.0.0", "hallmark": "~0.1.0", "level-community": "~3.0.0", "memdown": "^3.0.0", diff --git a/test/batch-test.js b/test/batch-test.js index 3fc92937..c0a54efc 100644 --- a/test/batch-test.js +++ b/test/batch-test.js @@ -290,9 +290,17 @@ buster.testCase('batch()', { 'test batch#put() with missing `value`': function () { // value = undefined - this.batch.put('foo1') + assert.exception(this.batch.put.bind(this.batch, 'foo1'), function (err) { + if (err.name !== 'WriteError') { return false } + if (err.message !== 'value cannot be `null` or `undefined`') { return false } + return true + }) - this.batch.put('foo1', null) + assert.exception(this.batch.put.bind(this.batch, 'foo1', null), function (err) { + if (err.name !== 'WriteError') { return false } + if (err.message !== 'value cannot be `null` or `undefined`') { return false } + return true + }) }, 'test batch#put() with missing `key`': function () {