From 3c92b787d75b1887012d4e355d32dbb4c8aebd8a Mon Sep 17 00:00:00 2001 From: Vincent Xue Date: Mon, 17 Jul 2017 12:39:41 +0800 Subject: [PATCH] test: use path.join in async-hooks/test-tlswrap.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14319 Reviewed-By: Tobias Nießen Reviewed-By: Vse Mozhet Byt Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil --- test/async-hooks/test-tlswrap.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/async-hooks/test-tlswrap.js b/test/async-hooks/test-tlswrap.js index 878afac06311a9..4aa2493765f37b 100644 --- a/test/async-hooks/test-tlswrap.js +++ b/test/async-hooks/test-tlswrap.js @@ -5,11 +5,13 @@ if (!common.hasCrypto) common.skip('missing crypto'); const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const tls = require('tls'); + const tick = require('./tick'); const initHooks = require('./init-hooks'); -const fs = require('fs'); const { checkInvocations } = require('./hook-checks'); -const tls = require('tls'); const hooks = initHooks(); hooks.enable(); @@ -19,8 +21,8 @@ hooks.enable(); // const server = tls .createServer({ - cert: fs.readFileSync(common.fixturesDir + '/test_cert.pem'), - key: fs.readFileSync(common.fixturesDir + '/test_key.pem') + cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')), + key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')) }) .on('listening', common.mustCall(onlistening)) .on('secureConnection', common.mustCall(onsecureConnection))