- 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
405 B
JavaScript
19 lines
405 B
JavaScript
var test = require('tape')
|
|
var Codec = require('..')
|
|
|
|
test('codec', function (t) {
|
|
var codec = new Codec({ keyEncoding: 'hex' })
|
|
t.ok(codec.keyAsBuffer())
|
|
codec = new Codec()
|
|
t.notOk(codec.keyAsBuffer())
|
|
t.end()
|
|
})
|
|
|
|
test('codec, new not needed', function (t) {
|
|
var codec = Codec({ keyEncoding: 'hex' })
|
|
t.ok(codec.keyAsBuffer())
|
|
codec = Codec()
|
|
t.notOk(codec.keyAsBuffer())
|
|
t.end()
|
|
})
|