From 3f3f457fbe11a7408e0b68ece4b18d6ebe97718c 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 c91c66085102c2..18735c8d9ed31b 100644 --- a/test/parallel/test-tls-fast-writing.js +++ b/test/parallel/test-tls-fast-writing.js @@ -3,14 +3,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;