From aaacddbcbf795989879b2f87eb02e90ab32fd5a6 Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Fri, 6 Oct 2017 10:32:00 -0700 Subject: [PATCH] test: use fixtures module in tls-handshake-error PR-URL: https://github.com/nodejs/node/pull/15939 Reviewed-By: Joyee Cheung Reviewed-By: Gireesh Punathil --- test/parallel/test-tls-handshake-error.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-handshake-error.js b/test/parallel/test-tls-handshake-error.js index e4a4addd37be1d..776004cf228f31 100644 --- a/test/parallel/test-tls-handshake-error.js +++ b/test/parallel/test-tls-handshake-error.js @@ -1,16 +1,18 @@ 'use strict'; const common = require('../common'); + 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 server = tls.createServer({ - key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), - cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`), + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem'), rejectUnauthorized: true }, function(c) { }).listen(0, common.mustCall(function() {