From aa2b6360445f94b5cd96a4a8a4b5e826725d3ba4 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 25 Dec 2018 14:36:24 +0000 Subject: [PATCH 1/2] chore(package): update encoding-down to version 6.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From f11852f78fd5a89ec26dec1b28b555ab77fa0f08 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Tue, 25 Dec 2018 15:56:59 +0100 Subject: [PATCH 2/2] fix test: encoding-down now rejects nullish values --- test/batch-test.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 () {