Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 74c3283

Browse filesBrowse files
targosaddaleax
authored andcommitted
test: fix test-buffer-slow
Fix incorrect use of string instead of RegExp in `throws` assertions. PR-URL: #9809 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent e2db5c8 commit 74c3283
Copy full SHA for 74c3283

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-buffer-slow.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-slow.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ assert.strictEqual(SlowBuffer('string').length, 0);
5151
// should throw with invalid length
5252
assert.throws(function() {
5353
SlowBuffer(Infinity);
54-
}, 'invalid Buffer length');
54+
}, /^RangeError: Invalid array buffer length$/);
5555
assert.throws(function() {
5656
SlowBuffer(-1);
57-
}, 'invalid Buffer length');
57+
}, /^RangeError: Invalid array buffer length$/);
5858
assert.throws(function() {
5959
SlowBuffer(buffer.kMaxLength + 1);
60-
}, 'invalid Buffer length');
60+
}, /^RangeError: (Invalid typed array length|Array buffer allocation failed)$/);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.