summaryrefslogtreecommitdiff
path: root/test/sequential/test-buffer-bad-overload.js
blob: 2102c1f9a71d5997fc7720374f63b139d5d8f280 (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() {
  new Buffer(10);
});

assert.throws(function() {
  new Buffer(10, 'hex');
});

assert.doesNotThrow(function() {
  new Buffer('deadbeaf', 'hex');
});