Files
FrenoCorp/node_modules/level-codec/test/as-buffer.js
Michael Freno 7c684a42cc FRE-600: Fix code review blockers
- 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>
2026-04-25 00:08:01 -04:00

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()
})