Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit fc5487c

Browse files
greenkeeper[bot]vweevers
authored andcommitted
Update encoding-down to the latest version 🚀 (#629)
* chore(package): update encoding-down to version 6.0.0 * fix test: encoding-down now rejects nullish values
1 parent 21f8fd2 commit fc5487c

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"concat-stream": "~2.0.0",
3434
"coveralls": "~3.0.2",
3535
"delayed": "~1.0.1",
36-
"encoding-down": "^5.0.0",
36+
"encoding-down": "^6.0.0",
3737
"hallmark": "~0.1.0",
3838
"level-community": "~3.0.0",
3939
"memdown": "^3.0.0",

test/batch-test.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,17 @@ buster.testCase('batch()', {
290290

291291
'test batch#put() with missing `value`': function () {
292292
// value = undefined
293-
this.batch.put('foo1')
293+
assert.exception(this.batch.put.bind(this.batch, 'foo1'), function (err) {
294+
if (err.name !== 'WriteError') { return false }
295+
if (err.message !== 'value cannot be `null` or `undefined`') { return false }
296+
return true
297+
})
294298

295-
this.batch.put('foo1', null)
299+
assert.exception(this.batch.put.bind(this.batch, 'foo1', null), function (err) {
300+
if (err.name !== 'WriteError') { return false }
301+
if (err.message !== 'value cannot be `null` or `undefined`') { return false }
302+
return true
303+
})
296304
},
297305

298306
'test batch#put() with missing `key`': function () {

0 commit comments

Comments
 (0)