Skip to content

Commit b1bbd4c

Browse files
committed
test: adapt buffer test for v8 sandbox
1 parent 04946a7 commit b1bbd4c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/parallel/test-buffer-concat.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'use strict';
2323
const common = require('../common');
2424
const assert = require('assert');
25+
const { kMaxLength } = require('buffer');
2526

2627
const zero = [];
2728
const one = [ Buffer.from('asdf') ];
@@ -84,8 +85,8 @@ assert.throws(() => {
8485
Buffer.concat([Buffer.from('hello')], -2);
8586
}, {
8687
code: 'ERR_OUT_OF_RANGE',
87-
message: 'The value of "length" is out of range. It must be >= 0 && <= 9007199254740991. ' +
88-
'Received -2'
88+
message: 'The value of "length" is out of range. It must be >= 0 && <= ' +
89+
`${kMaxLength}. Received -2`
8990
});
9091

9192
// eslint-disable-next-line node-core/crypto-check

0 commit comments

Comments
 (0)