Skip to content

Commit

Permalink
test: replace common.fixtiresDir with fixtures.readKey()
Browse files Browse the repository at this point in the history
Use fixtures module in test/parallel/test-tls-js-stream.js.

PR-URL: #16817
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
wsierakowski authored and MylesBorins committed Nov 28, 2017
1 parent 727a0fe commit b3b7858
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/parallel/test-tls-js-stream.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
'use strict';
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 stream = require('stream');
const fs = require('fs');
const net = require('net');
const stream = require('stream');
const tls = require('tls');

const connected = {
client: 0,
server: 0
};

const server = tls.createServer({
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
key: fixtures.readKey('agent1-key.pem'),
cert: fixtures.readKey('agent1-cert.pem')
}, function(c) {
console.log('new client');
connected.server++;
Expand Down

0 comments on commit b3b7858

Please sign in to comment.