mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: fix test-buffer-slow
Fix incorrect use of string instead of RegExp in `throws` assertions. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
e72dfce2c8
commit
e0c8aafad8
1 file changed
+3
-3
@@ -46,10 +46,10 @@ assert.strictEqual(SlowBuffer('string').length, 0);
|
||||
// should throw with invalid length
|
||||
assert.throws(function() {
|
||||
new SlowBuffer(Infinity);
|
||||
}, 'invalid Buffer length');
|
||||
}, /^RangeError: Invalid typed array length$/);
|
||||
assert.throws(function() {
|
||||
new SlowBuffer(-1);
|
||||
}, 'invalid Buffer length');
|
||||
}, /^RangeError: Invalid typed array length$/);
|
||||
assert.throws(function() {
|
||||
new SlowBuffer(buffer.kMaxLength + 1);
|
||||
}, 'invalid Buffer length');
|
||||
}, /^RangeError: (Invalid typed array length|Array buffer allocation failed)$/);
|
||||
Reference in new issue
Block a user