Skip to content

Commit a05fe5f

Browse files
dtexMylesBorins
authored andcommitted
test: use common/fixtures in tls-connect-no-host
PR-URL: #15986 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent cf31eb7 commit a05fe5f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/parallel/test-tls-connect-no-host.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
'use strict';
22
const common = require('../common');
3+
const fixtures = require('../common/fixtures');
34

45
if (!common.hasCrypto)
56
common.skip('missing crypto');
67

78
const tls = require('tls');
89

910
const assert = require('assert');
10-
const fs = require('fs');
11-
const path = require('path');
1211

13-
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
14-
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
12+
const cert = fixtures.readSync('test_cert.pem');
13+
const key = fixtures.readSync('test_key.pem');
1514

1615
// https://github.com/nodejs/node/issues/1489
1716
// tls.connect(options) with no options.host should accept a cert with

0 commit comments

Comments
 (0)