Skip to content

Commit cf9f1e1

Browse files
committed
test: replace common.fixturesDir with usage of common.fixtures module
1 parent 4f339b5 commit cf9f1e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/parallel/test-https-client-reject.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ const common = require('../common');
2424
if (!common.hasCrypto)
2525
common.skip('missing crypto');
2626

27+
const fixtures = require('../common/fixtures');
28+
2729
const assert = require('assert');
2830
const https = require('https');
2931
const fs = require('fs');
3032
const path = require('path');
3133

3234
const options = {
33-
key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')),
34-
cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))
35+
key: fs.readFileSync(fixtures.path('test_key.pem')),
36+
cert: fs.readFileSync(fixtures.path('test_cert.pem'))
3537
};
3638

3739
const server = https.createServer(options, common.mustCall(function(req, res) {
@@ -72,7 +74,7 @@ function rejectUnauthorized() {
7274
function authorized() {
7375
const options = {
7476
port: server.address().port,
75-
ca: [fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'))]
77+
ca: [fs.readFileSync(fixtures.path('test_cert.pem'))]
7678
};
7779
options.agent = new https.Agent(options);
7880
const req = https.request(options, function(res) {

0 commit comments

Comments
 (0)