GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: adapt buffer test for v8 sandbox · nodejs/node@6809ef8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-buffer-concat.js
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)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.