You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
285 B
11 lines
285 B
4 years ago
|
var test = require('tape');
|
||
|
var tou8 = require('../');
|
||
|
|
||
|
test('buffer to uint8', function (t) {
|
||
|
t.plan(2);
|
||
|
var buf = new Buffer('whatever');
|
||
|
var a = tou8(buf);
|
||
|
t.equal(a.constructor.name, 'Uint8Array', 'constructor name');
|
||
|
t.equal(a.length, 8, 'buffer length');
|
||
|
});
|