Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adds test
  • Loading branch information
jspri committed May 15, 2016
commit 61a4129cd934cd6c79a6d6bd75586a84c3bb6158
5 changes: 5 additions & 0 deletions test/parallel/test-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,11 @@ for (let i = 0; i < 256; i++) {
assert.equal(hexb2[i], hexb[i]);
}

//#6770 Test single hex character throws TypeError
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can reference github issues in comments, but it is usually preferred to give the full URL for things like that so that it’s easier to look up and there is no ambiguity wrt the old issue tracker at https://github.com/nodejs/node-v0.x-archive/

assert.throws(function() {
var b = Buffer.from('A', 'hex');
}, TypeError)

{
// test an invalid slice end.
console.log('Try to slice off the end of the buffer');
Expand Down