Skip to content

Commit f13d7bf

Browse files
authored
test: adapt buffer test for v8 sandbox
PR-URL: #61772 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 8f613ee commit f13d7bf

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)