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: minor refactoring · nodejs/node@1eac1d7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • addons/symlinked-module
      • test.js
    • internet
      • test-dns.js
    • parallel
      • test-assert-deep.js
      • test-buffer-alloc.js
      • test-buffer-bad-overload.js
      • test-buffer-constants.js
      • test-buffer-copy.js
      • test-buffer-sharedarraybuffer.js
      • test-buffer-slice.js
      • test-child-process-spawn-typeerror.js
      • test-console-async-write-error.js
      • test-console-instance.js
      • test-console-sync-write-error.js
      • test-crypto-padding.js
      • test-crypto-pbkdf2.js
      • test-crypto-rsa-dsa.js
      • test-domain-load-after-set-uncaught-exception-capture.js
      • test-fs-access.js
      • test-fs-buffer.js
      • test-fs-read-stream-throw-type-error.js
      • test-fs-write-stream-throw-type-error.js
      • test-http-invalidheaderfield.js
      • test-http2-binding.js
      • test-http2-client-rststream-before-connect.js
      • test-http2-compat-serverresponse-statuscode.js
      • test-http2-getpackedsettings.js
      • test-http2-server-startup.js
      • test-http2-socket-proxy.js
      • test-http2-withflag.js
      • test-https-agent-constructor.js
      • test-icu-punycode.js
      • test-internal-fs.js
      • test-internal-util-decorate-error-stack.js
      • test-module-symlinked-peer-modules.js
      • test-net-after-close.js
      • test-net-during-close.js
      • test-process-geteuid-getegid.js
      • test-process-setuid-setgid.js
      • test-querystring.js
      • test-readline-csi.js
      • test-stream-writable-null.js
      • test-timers-unref.js
      • test-util-inspect.js
      • test-vm-create-context-arg.js
      • test-vm-cross-context.js
    • pummel
      • test-fs-largefile.js
      • test-fs-watch-file.js
    • sequential
      • test-inspector-module.js
      • test-performance.js

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/addons/symlinked-module/test.js‎

Copy file name to clipboardExpand all lines: test/addons/symlinked-module/test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ const sub = require('./submodule');
3030
const mod = require(path.join(i, 'binding.node'));
3131
assert.notStrictEqual(mod, null);
3232
assert.strictEqual(mod.hello(), 'world');
33-
sub.test(i);
33+
sub.test(i); // Should not throw.
3434
});
Collapse file

‎test/internet/test-dns.js‎

Copy file name to clipboardExpand all lines: test/internet/test-dns.js
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,11 +579,8 @@ process.on('exit', function() {
579579
assert.ok(getaddrinfoCallbackCalled);
580580
});
581581

582-
582+
// Should not throw.
583583
dns.lookup(addresses.INET6_HOST, 6, common.mustCall());
584-
585584
dns.lookup(addresses.INET_HOST, {}, common.mustCall());
586-
587585
dns.lookupService('0.0.0.0', '0', common.mustCall());
588-
589586
dns.lookupService('0.0.0.0', 0, common.mustCall());
Collapse file

‎test/parallel/test-assert-deep.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-assert-deep.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ assertOnlyDeepEqual([1, , , 3], [1, , , 3, , , ]);
492492

493493
// Handle NaN
494494
assert.throws(() => { assert.deepEqual(NaN, NaN); }, assert.AssertionError);
495-
{ assert.deepStrictEqual(NaN, NaN); }
496-
{ assert.deepStrictEqual({ a: NaN }, { a: NaN }); }
495+
assert.deepStrictEqual(NaN, NaN);
496+
assert.deepStrictEqual({ a: NaN }, { a: NaN });
497497
assert.deepStrictEqual([ 1, 2, NaN, 4 ], [ 1, 2, NaN, 4 ]);
498498

499499
// Handle boxed primitives
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-alloc.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ assert.throws(() => b.write('test', 'utf8', 0),
6262
/is no longer supported/);
6363

6464

65-
// try to create 0-length buffers
65+
// Try to create 0-length buffers. Should not throw.
6666
Buffer.from('');
6767
Buffer.from('', 'ascii');
6868
Buffer.from('', 'latin1');
@@ -107,7 +107,7 @@ b.copy(Buffer.alloc(1), 0, 2048, 2048);
107107
assert.strictEqual(writeTest.toString(), 'nodejs');
108108
}
109109

110-
// Offset points to the end of the buffer
110+
// Offset points to the end of the buffer and does not throw.
111111
// (see https://github.com/nodejs/node/issues/8127).
112112
Buffer.alloc(1).write('', 1, 0);
113113

@@ -992,10 +992,10 @@ common.expectsError(() => {
992992
assert.strictEqual(ubuf.buffer.byteLength, 10);
993993
}
994994

995-
// Regression test
995+
// Regression test to verify that an empty ArrayBuffer does not throw.
996996
Buffer.from(new ArrayBuffer());
997997

998-
// Test that ArrayBuffer from a different context is detected correctly
998+
// Test that ArrayBuffer from a different context is detected correctly.
999999
const arrayBuf = vm.runInNewContext('new ArrayBuffer()');
10001000
Buffer.from(arrayBuf);
10011001
Buffer.from({ buffer: arrayBuf });
Collapse file

‎test/parallel/test-buffer-bad-overload.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-bad-overload.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const common = require('../common');
33
const assert = require('assert');
44

5-
Buffer.allocUnsafe(10);
5+
Buffer.allocUnsafe(10); // Should not throw.
66

77
const err = common.expectsError({
88
code: 'ERR_INVALID_ARG_TYPE',
@@ -14,4 +14,4 @@ assert.throws(function() {
1414
Buffer.from(10, 'hex');
1515
}, err);
1616

17-
Buffer.from('deadbeaf', 'hex');
17+
Buffer.from('deadbeaf', 'hex'); // Should not throw.
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-constants.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ assert(MAX_STRING_LENGTH <= MAX_LENGTH);
1111
assert.throws(() => ' '.repeat(MAX_STRING_LENGTH + 1),
1212
/^RangeError: Invalid string length$/);
1313

14-
' '.repeat(MAX_STRING_LENGTH);
14+
' '.repeat(MAX_STRING_LENGTH); // Should not throw.
1515

1616
// Legacy values match:
1717
assert.strictEqual(kMaxLength, MAX_LENGTH);
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-copy.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const bb = Buffer.allocUnsafe(10);
9292
bb.fill('hello crazy world');
9393

9494

95-
// try to copy from before the beginning of b
95+
// Try to copy from before the beginning of b. Should not throw.
9696
b.copy(c, 0, 100, 10);
9797

9898
// copy throws at negative sourceStart
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-sharedarraybuffer.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ arr2[1] = 6000;
2222

2323
assert.deepStrictEqual(arr_buf, ar_buf);
2424

25-
// Checks for calling Buffer.byteLength on a SharedArrayBuffer
26-
25+
// Checks for calling Buffer.byteLength on a SharedArrayBuffer.
2726
assert.strictEqual(Buffer.byteLength(sab), sab.byteLength);
2827

29-
Buffer.from({ buffer: sab });
28+
Buffer.from({ buffer: sab }); // Should not throw.
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-buffer-slice.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ expectedSameBufs.forEach(([buf1, buf2]) => {
7777

7878
const utf16Buf = Buffer.from('0123456789', 'utf16le');
7979
assert.deepStrictEqual(utf16Buf.slice(0, 6), Buffer.from('012', 'utf16le'));
80-
// try to slice a zero length Buffer
81-
// see https://github.com/joyent/node/issues/5881
82-
Buffer.alloc(0).slice(0, 1);
80+
// Try to slice a zero length Buffer.
81+
// See https://github.com/joyent/node/issues/5881
8382
assert.strictEqual(Buffer.alloc(0).slice(0, 1).length, 0);
8483

8584
{
Collapse file

‎test/parallel/test-child-process-spawn-typeerror.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-spawn-typeerror.js
+9-10Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ assert.throws(function() {
3838
child.on('error', common.mustNotCall());
3939
}, TypeError);
4040

41-
// verify that valid argument combinations do not throw
41+
// Verify that valid argument combinations do not throw.
4242
spawn(cmd);
4343
spawn(cmd, []);
4444
spawn(cmd, {});
4545
spawn(cmd, [], {});
4646

47-
// verify that invalid argument combinations throw
47+
// Verify that invalid argument combinations throw.
4848
assert.throws(function() {
4949
spawn();
5050
}, invalidFileMsg);
@@ -74,7 +74,7 @@ assert.throws(function() {
7474
spawn(cmd, [], 1);
7575
}, invalidOptionsMsg);
7676

77-
// Argument types for combinatorics
77+
// Argument types for combinatorics.
7878
const a = [];
7979
const o = {};
8080
function c() {}
@@ -92,7 +92,7 @@ spawn(cmd, a);
9292
spawn(cmd, a, o);
9393
spawn(cmd, o);
9494

95-
// Variants of undefined as explicit 'no argument' at a position
95+
// Variants of undefined as explicit 'no argument' at a position.
9696
spawn(cmd, u, o);
9797
spawn(cmd, a, u);
9898

@@ -103,7 +103,7 @@ assert.throws(function() { spawn(cmd, s); }, TypeError);
103103
assert.throws(function() { spawn(cmd, a, s); }, TypeError);
104104

105105

106-
// verify that execFile has same argument parsing behavior as spawn
106+
// Verify that execFile has same argument parsing behavior as spawn.
107107
//
108108
// function execFile(file=f [,args=a] [, options=o] [, callback=c]) has valid
109109
// combinations:
@@ -124,7 +124,7 @@ execFile(cmd, o);
124124
execFile(cmd, o, c);
125125
execFile(cmd, c);
126126

127-
// Variants of undefined as explicit 'no argument' at a position
127+
// Variants of undefined as explicit 'no argument' at a position.
128128
execFile(cmd, u, o, c);
129129
execFile(cmd, a, u, c);
130130
execFile(cmd, a, o, u);
@@ -146,7 +146,7 @@ execFile(cmd, o, n);
146146
execFile(cmd, c, u);
147147
execFile(cmd, c, n);
148148

149-
// string is invalid in arg position (this may seem strange, but is
149+
// String is invalid in arg position (this may seem strange, but is
150150
// consistent across node API, cf. `net.createServer('not options', 'not
151151
// callback')`
152152
assert.throws(function() { execFile(cmd, s, o, c); }, TypeError);
@@ -160,10 +160,9 @@ assert.throws(function() { execFile(cmd, a, u, s); }, TypeError);
160160
assert.throws(function() { execFile(cmd, a, n, s); }, TypeError);
161161
assert.throws(function() { execFile(cmd, u, o, s); }, TypeError);
162162
assert.throws(function() { execFile(cmd, n, o, s); }, TypeError);
163-
execFile(cmd, c, s);
163+
execFile(cmd, c, s); // Should not throw.
164164

165-
166-
// verify that fork has same argument parsing behavior as spawn
165+
// Verify that fork has same argument parsing behavior as spawn.
167166
//
168167
// function fork(file=f [,args=a] [, options=o]) has valid combinations:
169168
// (f)

0 commit comments

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