Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9ad0206

Browse filesBrowse files
codebytereaduh95
authored andcommitted
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 a9c5bd2 commit 9ad0206
Copy full SHA for 9ad0206

1 file changed

+3-2Lines changed: 3 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-buffer-concat.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-concat.js
+3-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.