From 2b76b5d8dd14b57eaad15b4082cc007296b4d630 Mon Sep 17 00:00:00 2001 From: Ben Hallion Date: Fri, 6 Oct 2017 09:32:08 -0700 Subject: [PATCH] test: use fixtures module Replace common.fixturesDir with fixtures module usage in test/parallel/test-tls-fast-writing.js. PR-URL: https://github.com/nodejs/node/pull/15808 Reviewed-By: Ryan Graham Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca --- test/parallel/test-tls-fast-writing.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-tls-fast-writing.js b/test/parallel/test-tls-fast-writing.js index d80874eea6..937694228a 100644 --- a/test/parallel/test-tls-fast-writing.js +++ b/test/parallel/test-tls-fast-writing.js @@ -24,14 +24,13 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +const fixtures = require('../common/fixtures'); const assert = require('assert'); const tls = require('tls'); -const fs = require('fs'); -const dir = common.fixturesDir; -const options = { key: fs.readFileSync(`${dir}/test_key.pem`), - cert: fs.readFileSync(`${dir}/test_cert.pem`), - ca: [ fs.readFileSync(`${dir}/test_ca.pem`) ] }; +const options = { key: fixtures.readSync('test_key.pem'), + cert: fixtures.readSync('test_cert.pem'), + ca: [ fixtures.readSync('test_ca.pem') ] }; const server = tls.createServer(options, onconnection); let gotChunk = false;