Skip to content

Commit f490421

Browse files
ryzokukenMylesBorins
authored andcommitted
test: use descriptive names for regression tests
Rename the tests appropriately alongside mentioning the subsystem. Also, make a few basic changes to make sure the tests conform to the standard test structure. - Rename test-regress-GH-9819 to test-crypto-tostring-segfault - Rename test-regress-GH-5051 to test-http-addrequest-localaddress - Rename test-regress-GH-5727 to test-net-listen-invalid-port - Rename test-regress-GH-5927 to test-tty-stdin-pipe - Rename test-regress-GH-6235 to test-v8-global-setter PR-URL: #19275 Refs: #19105 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b229912 commit f490421

5 files changed

+25
-0
lines changed

test/parallel/test-regress-GH-9819.js test/parallel/test-crypto-tostring-segfault.js

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ const common = require('../common');
33
if (!common.hasCrypto)
44
common.skip('missing crypto');
55

6+
// This test ensures that node doesn't SEGFAULT when either of
7+
// `crypto.createHash` or `crypto.createHmac` are given an object that defines
8+
// a throwing `toString`.
9+
// https://github.com/nodejs/node/issues/9819
10+
611
const assert = require('assert');
712
const execFile = require('child_process').execFile;
813

test/parallel/test-regress-GH-5051.js test/parallel/test-http-addrequest-localaddress.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
'use strict';
22
require('../common');
3+
4+
// This test ensures that `addRequest`'s Legacy API accepts `localAddress`
5+
// correctly instead of accepting `path`.
6+
// https://github.com/nodejs/node/issues/5051
7+
38
const assert = require('assert');
49
const agent = require('http').globalAgent;
510

test/parallel/test-regress-GH-5727.js test/parallel/test-net-listen-invalid-port.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
'use strict';
22
const common = require('../common');
3+
4+
// This test ensures that port numbers are validated in *all* kinds of `listen`
5+
// calls. If an invalid port is supplied, ensures a `RangeError` is thrown.
6+
// https://github.com/nodejs/node/issues/5727
7+
38
const assert = require('assert');
49
const net = require('net');
510

test/parallel/test-regress-GH-5927.js test/parallel/test-tty-stdin-pipe.js

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222
'use strict';
2323
require('../common');
24+
25+
// This test ensures piping from `stdin` isn't broken.
26+
// https://github.com/nodejs/node/issues/5927
27+
2428
const assert = require('assert');
2529
const readline = require('readline');
2630

test/parallel/test-regress-GH-6235.js test/parallel/test-v8-global-setter.js

+6
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ const assert = require('assert');
2626
assert.doesNotThrow(function() {
2727
require('vm').runInNewContext('"use strict"; var v = 1; v = 2');
2828
});
29+
30+
// This test ensures v8 correctly sets a property on the global object if it
31+
// has a setter interceptor in strict mode.
32+
// https://github.com/nodejs/node-v0.x-archive/issues/6235
33+
34+
require('vm').runInNewContext('"use strict"; var v = 1; v = 2');

0 commit comments

Comments
 (0)