mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 02:09:22 +02:00
18 lines
405 B
JavaScript
18 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()
|
|
})
|