test: rename regression tests
PR-URL: https://github.com/nodejs/node/pull/17948 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
a51944da0a
commit
fb6e980e1e
@ -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');
|
@ -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');
|
||||
|
@ -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');
|
18
test/parallel/test-os-userinfo-handles-getter-errors.js
Normal file
18
test/parallel/test-os-userinfo-handles-getter-errors.js
Normal file
@ -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');
|
||||
}));
|
@ -20,6 +20,10 @@
|
||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
'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');
|
@ -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) => {
|
Loading…
x
Reference in New Issue
Block a user