diff --git a/test/parallel/test-tls-connect-no-host.js b/test/parallel/test-tls-connect-no-host.js index f63c821a7f6a35..7a0806e66748f3 100644 --- a/test/parallel/test-tls-connect-no-host.js +++ b/test/parallel/test-tls-connect-no-host.js @@ -1,5 +1,6 @@ 'use strict'; const common = require('../common'); +const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); @@ -7,11 +8,9 @@ if (!common.hasCrypto) const tls = require('tls'); const assert = require('assert'); -const fs = require('fs'); -const path = require('path'); -const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')); -const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')); +const cert = fixtures.readSync('test_cert.pem'); +const key = fixtures.readSync('test_key.pem'); // https://github.com/nodejs/node/issues/1489 // tls.connect(options) with no options.host should accept a cert with