From a05fe5f716748b13f4dc2d12e941d06e423fc1cf Mon Sep 17 00:00:00 2001 From: Donovan Buck Date: Fri, 6 Oct 2017 11:03:41 -0700 Subject: [PATCH] test: use common/fixtures in tls-connect-no-host PR-URL: https://github.com/nodejs/node/pull/15986 Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-tls-connect-no-host.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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