Skip to content

Commit 534bc82

Browse files
ryzokukenBethGriggs
authored andcommitted
test: name test files appropriately
Rename the tests appropriately alongside mentioning the subsystem. Also, make a few basic changes to make sure the test conforms to the standard test structure. This renames: - test-regress-GH-1531 - test-regress-GH-2245 - test-regress-GH-3238 - test-regress-GH-3542 - test-regress-GH-3739 - test-regress-GH-4256 PR-URL: #19212 Refs: #19105 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent eaabbf4 commit 534bc82

6 files changed

+31
-13
lines changed

test/parallel/test-regress-GH-3238.js test/parallel/test-cluster-kill-disconnect.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
'use strict';
22
const common = require('../common');
3+
4+
// Check that cluster works perfectly for both `kill` and `disconnect` cases.
5+
// Also take into account that the `disconnect` event may be received after the
6+
// `exit` event.
7+
// https://github.com/nodejs/node/issues/3238
8+
39
const assert = require('assert');
410
const cluster = require('cluster');
511

test/parallel/test-regress-GH-2245.js test/parallel/test-eval-strict-referenceerror.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/* eslint-disable strict */
22
require('../common');
3-
const assert = require('assert');
43

5-
/*
6-
In Node.js 0.10, a bug existed that caused strict functions to not capture
7-
their environment when evaluated. When run in 0.10 `test()` fails with a
8-
`ReferenceError`. See https://github.com/nodejs/node/issues/2245 for details.
9-
*/
4+
// In Node.js 0.10, a bug existed that caused strict functions to not capture
5+
// their environment when evaluated. When run in 0.10 `test()` fails with a
6+
// `ReferenceError`. See https://github.com/nodejs/node/issues/2245 for details.
7+
8+
const assert = require('assert');
109

1110
function test() {
1211

test/parallel/test-regress-GH-3739.js test/parallel/test-fs-existssync-false.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
'use strict';
2-
32
const common = require('../common');
3+
const tmpdir = require('../common/tmpdir');
4+
5+
// This test ensures that fs.existsSync doesn't incorrectly return false.
6+
// (especially on Windows)
7+
// https://github.com/nodejs/node-v0.x-archive/issues/3739
8+
49
const assert = require('assert');
510
const fs = require('fs');
611
const path = require('path');
712

8-
const tmpdir = require('../common/tmpdir');
9-
1013
let dir = path.resolve(tmpdir.path);
1114

1215
// Make sure that the tmp directory is clean

test/parallel/test-regress-GH-3542.js test/parallel/test-fs-readfilesync-enoent.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
'use strict';
22
const common = require('../common');
3+
34
// This test is only relevant on Windows.
45
if (!common.isWindows)
56
common.skip('Windows specific test.');
67

8+
// This test ensures fs.realpathSync works on properly on Windows without
9+
// throwing ENOENT when the path involves a fileserver.
10+
// https://github.com/nodejs/node-v0.x-archive/issues/3542
11+
712
const assert = require('assert');
813
const fs = require('fs');
914
const path = require('path');

test/parallel/test-regress-GH-1531.js test/parallel/test-http-request-agent.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22
const common = require('../common');
33

4-
// This test ensures that a http request callback is called
5-
// when the agent option is set
6-
// See https://github.com/nodejs/node-v0.x-archive/issues/1531
7-
84
if (!common.hasCrypto)
95
common.skip('missing crypto');
106

117
const fixtures = require('../common/fixtures');
128

9+
// This test ensures that a http request callback is called when the agent
10+
// option is set.
11+
// See https://github.com/nodejs/node-v0.x-archive/issues/1531
12+
1313
const https = require('https');
1414

1515
const options = {

test/parallel/test-regress-GH-4256.js test/parallel/test-process-domain-segfault.js

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121

2222
'use strict';
2323
require('../common');
24+
25+
// This test ensures that setting `process.domain` to `null` does not result in
26+
// node crashing with a segfault.
27+
// https://github.com/nodejs/node-v0.x-archive/issues/4256
28+
2429
process.domain = null;
2530
setTimeout(function() {
2631
console.log('this console.log statement should not make node crash');

0 commit comments

Comments
 (0)