[8.x backport] test: remove common.fixturesDir by Trott · Pull Request #17770 · nodejs/node · GitHub
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions test/common/README.md
4 changes: 1 addition & 3 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const testRoot = process.env.NODE_TEST_DIR ?

const noop = () => {};

exports.fixturesDir = fixturesDir;

// Using a `.` prefixed name, which is the convention for "hidden" on POSIX,
// gets tools to ignore it by default or by simple rules, especially eslint.
let tmpDirName = '.tmp';
Expand Down Expand Up @@ -314,7 +312,7 @@ exports.childShouldThrowAndAbort = function() {

exports.ddCommand = function(filename, kilobytes) {
if (exports.isWindows) {
const p = path.resolve(exports.fixturesDir, 'create-file.js');
const p = path.resolve(fixturesDir, 'create-file.js');
return `"${process.argv[0]}" "${p}" "${filename}" ${kilobytes * 1024}`;
} else {
return `dd if=/dev/zero of="${filename}" bs=1024 count=${kilobytes}`;
Expand Down
10 changes: 4 additions & 6 deletions test/parallel/test-tls-interleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ if (!common.hasCrypto)
common.skip('missing crypto');

const assert = require('assert');

const tls = require('tls');

const fs = require('fs');
const fixtures = require('../common/fixtures');

const dir = common.fixturesDir;
const options = { key: fs.readFileSync(`${dir}/test_key.pem`),
cert: fs.readFileSync(`${dir}/test_cert.pem`),
ca: [ fs.readFileSync(`${dir}/test_ca.pem`) ] };
const options = { key: fixtures.readSync('test_key.pem'),
cert: fixtures.readSync('test_cert.pem'),
ca: [ fixtures.readSync('test_ca.pem') ] };

const writes = [
'some server data',
Expand Down
7 changes: 4 additions & 3 deletions test/parallel/test-tls-invoke-queued.js