Skip to content

Commit 2a147c9

Browse files
lpincaaduh95
andauthored
Update test/parallel/test-http2-client-promisify-connect-error.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent f68fd2b commit 2a147c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-http2-client-promisify-connect-error.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ const util = require('util');
1010

1111
const connect = util.promisify(http2.connect);
1212

13+
const error = new Error('Unable to resolve hostname');
14+
1315
function lookup(hostname, options, callback) {
14-
const error = new Error('Unable to resolve hostname');
15-
error.code = 'ENOTFOUND';
1616
callback(error);
1717
}
1818

1919
assert.rejects(
2020
connect('http://hostname', { lookup }),
21-
{ code: 'ENOTFOUND' }
21+
error,
2222
).then(common.mustCall());

0 commit comments

Comments
 (0)