We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04946a7 commit b1bbd4cCopy full SHA for b1bbd4c
test/parallel/test-buffer-concat.js
@@ -22,6 +22,7 @@
22
'use strict';
23
const common = require('../common');
24
const assert = require('assert');
25
+const { kMaxLength } = require('buffer');
26
27
const zero = [];
28
const one = [ Buffer.from('asdf') ];
@@ -84,8 +85,8 @@ assert.throws(() => {
84
85
Buffer.concat([Buffer.from('hello')], -2);
86
}, {
87
code: 'ERR_OUT_OF_RANGE',
- message: 'The value of "length" is out of range. It must be >= 0 && <= 9007199254740991. ' +
88
- 'Received -2'
+ message: 'The value of "length" is out of range. It must be >= 0 && <= ' +
89
+ `${kMaxLength}. Received -2`
90
});
91
92
// eslint-disable-next-line node-core/crypto-check
0 commit comments