blob: d5626e16d1441984388107e02fae871684244376 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
'use strict';
require('../common');
const assert = require('assert');
assert.doesNotThrow(function() {
Buffer.allocUnsafe(10);
});
assert.throws(function() {
Buffer.from(10, 'hex');
}, /^TypeError: "value" argument must not be a number$/);
assert.doesNotThrow(function() {
Buffer.from('deadbeaf', 'hex');
});
|