Skip to content

Commit

Permalink
relax tests for serializing object in chained-batch-test.js
Browse files Browse the repository at this point in the history
* similar to the fix that was made in #100
* fixes tests for memdown
  • Loading branch information
ralphtheninja committed Sep 4, 2017
1 parent dcc278d commit a68d0ee
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions abstract/chained-batch-test.js
Expand Up @@ -182,13 +182,11 @@ module.exports.args = function (test) {
.put({ foo: 'bar' }, { beep: 'boop' })
.del({ bar: 'baz' })
ops.forEach(function (op) {
if (Buffer.isBuffer(op.key)) op.key = String(op.key)
if (Buffer.isBuffer(op.value)) op.value = String(op.value)
t.ok(op.key, '.key is set for .put and .del operations')
if (op.type === 'put') {
t.ok(op.value, '.value is set for .put operation')
}
})
t.deepEqual(ops, [
{ type: 'put', key: '[object Object]', value: '[object Object]' }
, { type: 'del', key: '[object Object]' }
])
t.end()
})

Expand Down

0 comments on commit a68d0ee

Please sign in to comment.