diff options
author | Ujjwal Sharma <usharma1998@gmail.com> | 2018-03-08 02:24:08 +0530 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-03-11 04:17:42 +0100 |
commit | 580ad0157a4dcb21a8ed6b288defdd959711f364 (patch) | |
tree | 2235a5f3e6c3832079368a95bab0fe0fae1fed51 /test/parallel | |
parent | 6ec41bbdd7755e25049a584f2080d1bdfd7314c0 (diff) | |
download | node-new-580ad0157a4dcb21a8ed6b288defdd959711f364.tar.gz |
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: https://github.com/nodejs/node/pull/19212
Refs: https://github.com/nodejs/node/issues/19105
Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-cluster-kill-disconnect.js (renamed from test/parallel/test-regress-GH-3238.js) | 6 | ||||
-rw-r--r-- | test/parallel/test-eval-strict-referenceerror.js (renamed from test/parallel/test-regress-GH-2245.js) | 11 | ||||
-rw-r--r-- | test/parallel/test-fs-existssync-false.js (renamed from test/parallel/test-regress-GH-3739.js) | 9 | ||||
-rw-r--r-- | test/parallel/test-fs-readfilesync-enoent.js (renamed from test/parallel/test-regress-GH-3542.js) | 5 | ||||
-rw-r--r-- | test/parallel/test-http-request-agent.js (renamed from test/parallel/test-regress-GH-1531.js) | 8 | ||||
-rw-r--r-- | test/parallel/test-process-domain-segfault.js (renamed from test/parallel/test-regress-GH-4256.js) | 5 |
6 files changed, 31 insertions, 13 deletions
diff --git a/test/parallel/test-regress-GH-3238.js b/test/parallel/test-cluster-kill-disconnect.js index dd65d849d5..f5407612a8 100644 --- a/test/parallel/test-regress-GH-3238.js +++ b/test/parallel/test-cluster-kill-disconnect.js @@ -1,5 +1,11 @@ 'use strict'; const common = require('../common'); + +// Check that cluster works perfectly for both `kill` and `disconnect` cases. +// Also take into account that the `disconnect` event may be received after the +// `exit` event. +// https://github.com/nodejs/node/issues/3238 + const assert = require('assert'); const cluster = require('cluster'); diff --git a/test/parallel/test-regress-GH-2245.js b/test/parallel/test-eval-strict-referenceerror.js index 37260b59e3..a96478a1be 100644 --- a/test/parallel/test-regress-GH-2245.js +++ b/test/parallel/test-eval-strict-referenceerror.js @@ -1,12 +1,11 @@ /* eslint-disable strict */ require('../common'); -const assert = require('assert'); -/* -In Node.js 0.10, a bug existed that caused strict functions to not capture -their environment when evaluated. When run in 0.10 `test()` fails with a -`ReferenceError`. See https://github.com/nodejs/node/issues/2245 for details. -*/ +// In Node.js 0.10, a bug existed that caused strict functions to not capture +// their environment when evaluated. When run in 0.10 `test()` fails with a +// `ReferenceError`. See https://github.com/nodejs/node/issues/2245 for details. + +const assert = require('assert'); function test() { diff --git a/test/parallel/test-regress-GH-3739.js b/test/parallel/test-fs-existssync-false.js index dbf77ad785..de5ecfa66a 100644 --- a/test/parallel/test-regress-GH-3739.js +++ b/test/parallel/test-fs-existssync-false.js @@ -1,12 +1,15 @@ 'use strict'; - const common = require('../common'); +const tmpdir = require('../common/tmpdir'); + +// This test ensures that fs.existsSync doesn't incorrectly return false. +// (especially on Windows) +// https://github.com/nodejs/node-v0.x-archive/issues/3739 + const assert = require('assert'); const fs = require('fs'); const path = require('path'); -const tmpdir = require('../common/tmpdir'); - let dir = path.resolve(tmpdir.path); // Make sure that the tmp directory is clean diff --git a/test/parallel/test-regress-GH-3542.js b/test/parallel/test-fs-readfilesync-enoent.js index b652c95c9a..3d421e52b1 100644 --- a/test/parallel/test-regress-GH-3542.js +++ b/test/parallel/test-fs-readfilesync-enoent.js @@ -1,9 +1,14 @@ 'use strict'; const common = require('../common'); + // This test is only relevant on Windows. if (!common.isWindows) common.skip('Windows specific test.'); +// This test ensures fs.realpathSync works on properly on Windows without +// throwing ENOENT when the path involves a fileserver. +// https://github.com/nodejs/node-v0.x-archive/issues/3542 + const assert = require('assert'); const fs = require('fs'); const path = require('path'); diff --git a/test/parallel/test-regress-GH-1531.js b/test/parallel/test-http-request-agent.js index a61cc64ab6..a1f3077ed2 100644 --- a/test/parallel/test-regress-GH-1531.js +++ b/test/parallel/test-http-request-agent.js @@ -1,15 +1,15 @@ 'use strict'; const common = require('../common'); -// This test ensures that a http request callback is called -// when the agent option is set -// See https://github.com/nodejs/node-v0.x-archive/issues/1531 - if (!common.hasCrypto) common.skip('missing crypto'); const fixtures = require('../common/fixtures'); +// This test ensures that a http request callback is called when the agent +// option is set. +// See https://github.com/nodejs/node-v0.x-archive/issues/1531 + const https = require('https'); const options = { diff --git a/test/parallel/test-regress-GH-4256.js b/test/parallel/test-process-domain-segfault.js index 6a4a4467b4..78009f4687 100644 --- a/test/parallel/test-regress-GH-4256.js +++ b/test/parallel/test-process-domain-segfault.js @@ -21,6 +21,11 @@ 'use strict'; require('../common'); + +// This test ensures that setting `process.domain` to `null` does not result in +// node crashing with a segfault. +// https://github.com/nodejs/node-v0.x-archive/issues/4256 + process.domain = null; setTimeout(function() { console.log('this console.log statement should not make node crash'); |