Skip to content

Commit bc42761

Browse files
committed
test: rename regression tests with descriptive file names
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 Refs: #19105 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure
1 parent 5826fe4 commit bc42761

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

β€Žtest/parallel/test-regress-GH-9819.jsβ€Ž renamed to β€Žtest/parallel/test-crypto-tostring-segfault.jsβ€Ž

Lines changed: 5 additions & 0 deletions
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β€Ž renamed to β€Žtest/parallel/test-http-addrequest-localaddress.jsβ€Ž

Lines changed: 5 additions & 0 deletions
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β€Ž renamed to β€Žtest/parallel/test-net-listen-invalid-port.jsβ€Ž

Lines changed: 5 additions & 0 deletions
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β€Ž renamed to β€Žtest/parallel/test-tty-stdin-pipe.jsβ€Ž

Lines changed: 4 additions & 0 deletions
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β€Ž renamed to β€Žtest/parallel/test-v8-global-setter.jsβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@
2222
'use strict';
2323
require('../common');
2424

25+
// This test ensures v8 correctly sets a property on the global object if it
26+
// has a setter interceptor in strict mode.
27+
// https://github.com/nodejs/node-v0.x-archive/issues/6235
28+
2529
require('vm').runInNewContext('"use strict"; var v = 1; v = 2');

0 commit comments

Comments
Β (0)