Skip to content
This repository was archived by the owner on Aug 31, 2018. It is now read-only.

Commit d6b06ec

Browse files
weiplanetaddaleax
authored andcommitted
test: replace fixturesDir with the fixtures module
PR-URL: nodejs/node#16027 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
1 parent d02fb33 commit d6b06ec

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/parallel/test-http-default-port.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,14 @@ const common = require('../common');
2525
if (!common.hasCrypto)
2626
common.skip('missing crypto');
2727

28+
const fixtures = require('../common/fixtures');
2829
const http = require('http');
2930
const https = require('https');
3031
const assert = require('assert');
3132
const hostExpect = 'localhost';
32-
const fs = require('fs');
33-
const path = require('path');
34-
const fixtures = path.join(common.fixturesDir, 'keys');
3533
const options = {
36-
key: fs.readFileSync(`${fixtures}/agent1-key.pem`),
37-
cert: fs.readFileSync(`${fixtures}/agent1-cert.pem`)
34+
key: fixtures.readKey('agent1-key.pem'),
35+
cert: fixtures.readKey('agent1-cert.pem')
3836
};
3937
let gotHttpsResp = false;
4038
let gotHttpResp = false;

0 commit comments

Comments
 (0)