Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d185bfd

Browse filesBrowse files
Casie Lynchgibfahn
authored andcommitted
test: replace fixturesDir in test-tls-connect
Replace common.fixturesDir with fixtures module in test-tls-connect. PR-URL: #15849 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent ce07cbe commit d185bfd
Copy full SHA for d185bfd

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-tls-connect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-connect.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ const common = require('../common');
2525
if (!common.hasCrypto)
2626
common.skip('missing crypto');
2727

28+
const fixtures = require('../common/fixtures');
29+
2830
const assert = require('assert');
29-
const fs = require('fs');
30-
const path = require('path');
3131
const tls = require('tls');
3232

3333
// https://github.com/joyent/node/issues/1218
3434
// uncatchable exception on TLS connection error
3535
{
36-
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
37-
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
36+
const cert = fixtures.readSync('test_cert.pem');
37+
const key = fixtures.readSync('test_key.pem');
3838

3939
const options = { cert: cert, key: key, port: common.PORT };
4040
const conn = tls.connect(options, common.mustNotCall());
@@ -47,8 +47,8 @@ const tls = require('tls');
4747

4848
// SSL_accept/SSL_connect error handling
4949
{
50-
const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
51-
const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
50+
const cert = fixtures.readSync('test_cert.pem');
51+
const key = fixtures.readSync('test_key.pem');
5252

5353
const conn = tls.connect({
5454
cert: cert,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.