diff options
author | starkwang <381152119@qq.com> | 2017-06-28 23:58:39 -0400 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2017-07-12 17:00:30 -0400 |
commit | dbfe8c4ea2fb30f7d3dc4f8e361e3059b0e1e50f (patch) | |
tree | 35c3e4c7942fcb826e19f7a9eead918f9caa805b /test/parallel/test-buffer-regression-649.js | |
parent | 1562fb9ea7b993382a4aef0433a10b1029419f17 (diff) | |
download | node-new-dbfe8c4ea2fb30f7d3dc4f8e361e3059b0e1e50f.tar.gz |
errors,buffer: port errors to internal/errors
PR-URL: https://github.com/nodejs/node/pull/13976
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'test/parallel/test-buffer-regression-649.js')
-rw-r--r-- | test/parallel/test-buffer-regression-649.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/parallel/test-buffer-regression-649.js b/test/parallel/test-buffer-regression-649.js index dc6f78bebb..f02e769fa2 100644 --- a/test/parallel/test-buffer-regression-649.js +++ b/test/parallel/test-buffer-regression-649.js @@ -6,7 +6,11 @@ const SlowBuffer = require('buffer').SlowBuffer; // Regression test for https://github.com/nodejs/node/issues/649. const len = 1422561062959; -const message = common.bufferMaxSizeMsg; +const message = common.expectsError({ + code: 'ERR_INVALID_OPT_VALUE', + type: RangeError, + message: /^The value "[^"]*" is invalid for option "size"$/ +}, 5); assert.throws(() => Buffer(len).toString('utf8'), message); assert.throws(() => SlowBuffer(len).toString('utf8'), message); assert.throws(() => Buffer.alloc(len).toString('utf8'), message); |