FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: add regex check in test-buffer-bad-overload · nodejs/node@aba15fb · GitHub

/ node Public

Commit aba15fb

Browse files
authored andcommitted
test: add regex check in test-buffer-bad-overload
Creating a buffer from a number should throw an error with a message that describes the issue. PR-URL: #10038 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent ac9348d commit aba15fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/parallel/test-buffer-bad-overload.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assert.doesNotThrow(function() {
88

99
assert.throws(function() {
1010
Buffer.from(10, 'hex');
11-
});
11+
}, /^TypeError: "value" argument must not be a number$/);
1212

1313
assert.doesNotThrow(function() {
1414
Buffer.from('deadbeaf', 'hex');

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL