- Consolidated duplicate UndoManagers to single instance - Fixed connection promise to only resolve on 'connected' status - Fixed WebSocketProvider import (WebsocketProvider) - Added proper doc.destroy() cleanup - Renamed isPresenceInitialized property to avoid conflict Co-Authored-By: Paperclip <noreply@paperclip.ing>
19 lines
487 B
JavaScript
19 lines
487 B
JavaScript
var test = require('tape')
|
|
var Codec = require('..')
|
|
|
|
test('key as buffer', function (t) {
|
|
var codec = new Codec({ keyEncoding: 'hex' })
|
|
t.ok(codec.keyAsBuffer({}))
|
|
t.ok(codec.keyAsBuffer())
|
|
t.notOk(codec.keyAsBuffer({ keyEncoding: 'utf8' }))
|
|
t.end()
|
|
})
|
|
|
|
test('value as buffer', function (t) {
|
|
var codec = new Codec({ valueEncoding: 'hex' })
|
|
t.ok(codec.valueAsBuffer({}))
|
|
t.ok(codec.valueAsBuffer())
|
|
t.notOk(codec.valueAsBuffer({ valueEncoding: 'utf8' }))
|
|
t.end()
|
|
})
|