test: use path.join in async-hooks/test-tlswrap.js
PR-URL: https://github.com/nodejs/node/pull/14319 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
parent
4d5ae3022c
commit
d8eb30ac10
@ -5,11 +5,13 @@ if (!common.hasCrypto)
|
|||||||
common.skip('missing crypto');
|
common.skip('missing crypto');
|
||||||
|
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
const tls = require('tls');
|
||||||
|
|
||||||
const tick = require('./tick');
|
const tick = require('./tick');
|
||||||
const initHooks = require('./init-hooks');
|
const initHooks = require('./init-hooks');
|
||||||
const fs = require('fs');
|
|
||||||
const { checkInvocations } = require('./hook-checks');
|
const { checkInvocations } = require('./hook-checks');
|
||||||
const tls = require('tls');
|
|
||||||
|
|
||||||
const hooks = initHooks();
|
const hooks = initHooks();
|
||||||
hooks.enable();
|
hooks.enable();
|
||||||
@ -19,8 +21,8 @@ hooks.enable();
|
|||||||
//
|
//
|
||||||
const server = tls
|
const server = tls
|
||||||
.createServer({
|
.createServer({
|
||||||
cert: fs.readFileSync(common.fixturesDir + '/test_cert.pem'),
|
cert: fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')),
|
||||||
key: fs.readFileSync(common.fixturesDir + '/test_key.pem')
|
key: fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'))
|
||||||
})
|
})
|
||||||
.on('listening', common.mustCall(onlistening))
|
.on('listening', common.mustCall(onlistening))
|
||||||
.on('secureConnection', common.mustCall(onsecureConnection))
|
.on('secureConnection', common.mustCall(onsecureConnection))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user