assert.throws(function() {
  var buf = new Buffer(8);
  buf.readFloatLE(-1);
}, /offset is not uint/);
Example #2
0
assert.throws(function() {
  var buf = new Buffer(8);
  buf.readFloatLE(0xffffffff);
}, RangeError);
assert.throws(function() {
  var buf = new Buffer(8);
  buf.readFloatLE(0xffffffff);
}, /Trying to access beyond buffer length/);