diff --git a/test/parallel/test-tls-friendly-error-message.js b/test/parallel/test-tls-friendly-error-message.js index 644b298fb9a40c..2989837b19f38e 100644 --- a/test/parallel/test-tls-friendly-error-message.js +++ b/test/parallel/test-tls-friendly-error-message.js @@ -24,12 +24,12 @@ 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 key = fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`); -const cert = fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`); +const key = fixtures.readKey('agent1-key.pem'); +const cert = fixtures.readKey('agent1-cert.pem'); tls.createServer({ key: key, cert: cert }, common.mustCall(function(conn) { conn.end();