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: use correct size in test-stream-buffer-list · nodejs/node@6f3fb46

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-stream-buffer-list.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-stream-buffer-list.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-buffer-list.js
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,19 @@ assert.strictEqual(emptyList.join(','), '');
1414

1515
assert.deepStrictEqual(emptyList.concat(0), Buffer.alloc(0));
1616

17+
const buf = Buffer.from('foo');
18+
1719
// Test buffer list with one element.
1820
const list = new BufferList();
19-
list.push('foo');
21+
list.push(buf);
22+
23+
const copy = list.concat(3);
2024

21-
assert.strictEqual(list.concat(1), 'foo');
25+
assert.notStrictEqual(copy, buf);
26+
assert.deepStrictEqual(copy, buf);
2227

2328
assert.strictEqual(list.join(','), 'foo');
2429

2530
const shifted = list.shift();
26-
assert.strictEqual(shifted, 'foo');
31+
assert.strictEqual(shifted, buf);
2732
assert.deepStrictEqual(list, new BufferList());

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.