Skip to content

Commit

Permalink
test: name test files appropriately
Browse files Browse the repository at this point in the history
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 <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
ryzokuken authored and targos committed Mar 17, 2018
1 parent d773fd4 commit b706d5d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
Original file line number Diff line number Diff line change
@@ -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() {

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit b706d5d

Please sign in to comment.