Skip to content

Commit 51eab4b

Browse files
tniessenMylesBorins
authored andcommitted
test: rename regression tests
PR-URL: #17948 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 8806e54 commit 51eab4b

6 files changed

+34
-8
lines changed

test/parallel/test-regress-GH-1899.js test/parallel/test-child-process-can-write-to-stdout.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
'use strict';
2+
// Tests that a spawned child process can write to stdout without throwing.
3+
// See https://github.com/nodejs/node-v0.x-archive/issues/1899.
4+
25
require('../common');
36
const fixtures = require('../common/fixtures');
47
const assert = require('assert');

test/parallel/test-regress-GH-819.js test/parallel/test-net-connect-after-destroy.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
'use strict';
2+
// Regression test for https://github.com/nodejs/node-v0.x-archive/issues/819.
3+
24
require('../common');
35
const net = require('net');
46

test/parallel/test-regress-GH-746.js test/parallel/test-net-listen-after-destroying-stdin.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22
// Just test that destroying stdin doesn't mess up listening on a server.
3-
// This is a regression test for GH-746.
3+
// This is a regression test for
4+
// https://github.com/nodejs/node-v0.x-archive/issues/746.
45

56
const common = require('../common');
67
const net = require('net');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
// Tests that os.userInfo correctly handles errors thrown by option property
3+
// getters. See https://github.com/nodejs/node/issues/12370.
4+
5+
const common = require('../common');
6+
const assert = require('assert');
7+
const execFile = require('child_process').execFile;
8+
9+
const script = `os.userInfo({
10+
get encoding() {
11+
throw new Error('xyz');
12+
}
13+
})`;
14+
15+
const node = process.execPath;
16+
execFile(node, [ '-e', script ], common.mustCall((err, stdout, stderr) => {
17+
assert(stderr.includes('Error: xyz'), 'userInfo crashes');
18+
}));

test/parallel/test-regress-GH-7511.js test/parallel/test-vm-access-process-env.js

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23+
// Tests that node does neither crash nor throw an error when accessing
24+
// process.env when inside a VM context.
25+
// See https://github.com/nodejs/node-v0.x-archive/issues/7511.
26+
2327
require('../common');
2428
const assert = require('assert');
2529
const vm = require('vm');

test/parallel/test-regress-GH-12371.js test/parallel/test-vm-api-handles-getter-errors.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
'use strict';
2+
// Tests that vm.createScript and runInThisContext correctly handle errors
3+
// thrown by option property getters.
4+
// See https://github.com/nodejs/node/issues/12369.
5+
26
const common = require('../common');
37
const assert = require('assert');
48
const execFile = require('child_process').execFile;
59

6-
const scripts = [
7-
`os.userInfo({
8-
get encoding() {
9-
throw new Error('xyz');
10-
}
11-
})`
12-
];
10+
const scripts = [];
1311

1412
['filename', 'cachedData', 'produceCachedData', 'lineOffset', 'columnOffset']
1513
.forEach((prop) => {

0 commit comments

Comments
 (0)