diff --git a/test/parallel/test-http-client-response-domain.js b/test/parallel/test-http-client-response-domain.js index 0a32e929141e45..617dc729acb71f 100644 --- a/test/parallel/test-http-client-response-domain.js +++ b/test/parallel/test-http-client-response-domain.js @@ -44,8 +44,8 @@ server.listen(common.PIPE, function() { function test() { - d.on('error', common.mustCall(function(err) { - assert.strictEqual('should be caught by domain', err.message); + d.on('error', common.mustCall((err) => { + assert.strictEqual(err.message, 'should be caught by domain'); })); const req = http.get({