diff --git a/test/parallel/test-regress-GH-1899.js b/test/parallel/test-child-process-can-write-to-stdout.js similarity index 76% rename from test/parallel/test-regress-GH-1899.js rename to test/parallel/test-child-process-can-write-to-stdout.js index 6bf6860ef77d5b..bb9ddb71c827bc 100644 --- a/test/parallel/test-regress-GH-1899.js +++ b/test/parallel/test-child-process-can-write-to-stdout.js @@ -1,4 +1,7 @@ 'use strict'; +// Tests that a spawned child process can write to stdout without throwing. +// See https://github.com/nodejs/node-v0.x-archive/issues/1899. + require('../common'); const fixtures = require('../common/fixtures'); const assert = require('assert'); diff --git a/test/parallel/test-regress-GH-819.js b/test/parallel/test-net-connect-after-destroy.js similarity index 69% rename from test/parallel/test-regress-GH-819.js rename to test/parallel/test-net-connect-after-destroy.js index 719d4398251eab..6697cf8e32f8e4 100644 --- a/test/parallel/test-regress-GH-819.js +++ b/test/parallel/test-net-connect-after-destroy.js @@ -1,4 +1,6 @@ 'use strict'; +// Regression test for https://github.com/nodejs/node-v0.x-archive/issues/819. + require('../common'); const net = require('net'); diff --git a/test/parallel/test-regress-GH-746.js b/test/parallel/test-net-listen-after-destroying-stdin.js similarity index 82% rename from test/parallel/test-regress-GH-746.js rename to test/parallel/test-net-listen-after-destroying-stdin.js index 9a6e0e8980f311..5a4c8f4f65c55f 100644 --- a/test/parallel/test-regress-GH-746.js +++ b/test/parallel/test-net-listen-after-destroying-stdin.js @@ -1,6 +1,7 @@ 'use strict'; // Just test that destroying stdin doesn't mess up listening on a server. -// This is a regression test for GH-746. +// This is a regression test for +// https://github.com/nodejs/node-v0.x-archive/issues/746. const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-os-userinfo-handles-getter-errors.js b/test/parallel/test-os-userinfo-handles-getter-errors.js new file mode 100644 index 00000000000000..146ab6c812379f --- /dev/null +++ b/test/parallel/test-os-userinfo-handles-getter-errors.js @@ -0,0 +1,18 @@ +'use strict'; +// Tests that os.userInfo correctly handles errors thrown by option property +// getters. See https://github.com/nodejs/node/issues/12370. + +const common = require('../common'); +const assert = require('assert'); +const execFile = require('child_process').execFile; + +const script = `os.userInfo({ + get encoding() { + throw new Error('xyz'); + } +})`; + +const node = process.execPath; +execFile(node, [ '-e', script ], common.mustCall((err, stdout, stderr) => { + assert(stderr.includes('Error: xyz'), 'userInfo crashes'); +})); diff --git a/test/parallel/test-regress-GH-7511.js b/test/parallel/test-vm-access-process-env.js similarity index 62% rename from test/parallel/test-regress-GH-7511.js rename to test/parallel/test-vm-access-process-env.js index a7ce8311d7237f..081aa642fcff38 100644 --- a/test/parallel/test-regress-GH-7511.js +++ b/test/parallel/test-vm-access-process-env.js @@ -1,4 +1,8 @@ 'use strict'; +// Tests that node does neither crash nor throw an error when accessing +// process.env when inside a VM context. +// See https://github.com/nodejs/node-v0.x-archive/issues/7511. + require('../common'); const assert = require('assert'); const vm = require('vm'); diff --git a/test/parallel/test-regress-GH-12371.js b/test/parallel/test-vm-api-handles-getter-errors.js similarity index 80% rename from test/parallel/test-regress-GH-12371.js rename to test/parallel/test-vm-api-handles-getter-errors.js index 6ab65a8e348e1e..6a74fb29c17c81 100644 --- a/test/parallel/test-regress-GH-12371.js +++ b/test/parallel/test-vm-api-handles-getter-errors.js @@ -1,15 +1,13 @@ 'use strict'; +// Tests that vm.createScript and runInThisContext correctly handle errors +// thrown by option property getters. +// See https://github.com/nodejs/node/issues/12369. + const common = require('../common'); const assert = require('assert'); const execFile = require('child_process').execFile; -const scripts = [ - `os.userInfo({ - get encoding() { - throw new Error('xyz'); - } - })` -]; +const scripts = []; ['filename', 'cachedData', 'produceCachedData', 'lineOffset', 'columnOffset'] .forEach((prop) => {