From 81bb56040a4fa4947bb408772a3782516ab4c863 Mon Sep 17 00:00:00 2001 From: WeiPlanet Date: Fri, 6 Oct 2017 12:05:13 -0700 Subject: [PATCH] test: replace fixturesDir with the fixtures module PR-URL: https://github.com/nodejs/node/pull/16027 Reviewed-By: Michael Dawson Reviewed-By: Ruben Bridgewater Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Yuta Hiroto --- test/parallel/test-http-default-port.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-http-default-port.js b/test/parallel/test-http-default-port.js index 55ad7d7dfa1955..7247f199c8e454 100644 --- a/test/parallel/test-http-default-port.js +++ b/test/parallel/test-http-default-port.js @@ -1,14 +1,16 @@ 'use strict'; const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const fixtures = require('../common/fixtures'); const http = require('http'); const assert = require('assert'); const hostExpect = 'localhost'; -const fs = require('fs'); -const path = require('path'); -const fixtures = path.join(common.fixturesDir, 'keys'); const options = { - key: fs.readFileSync(`${fixtures}/agent1-key.pem`), - cert: fs.readFileSync(`${fixtures}/agent1-cert.pem`) + key: fixtures.readKey('agent1-key.pem'), + cert: fixtures.readKey('agent1-cert.pem') }; let gotHttpsResp = false; let gotHttpResp = false;