This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/buffer/test/node/test-buffer-bad-overload.js
2019-08-11 20:48:02 +02:00

18 lines
282 B
JavaScript

'use strict';
var Buffer = require('../../').Buffer;
var assert = require('assert');
assert.doesNotThrow(function() {
Buffer.allocUnsafe(10);
});
assert.throws(function() {
Buffer.from(10, 'hex');
});
assert.doesNotThrow(function() {
Buffer.from('deadbeaf', 'hex');
});