diff options
Diffstat (limited to 'test/parallel/test-http-client-response-domain.js')
-rw-r--r-- | test/parallel/test-http-client-response-domain.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/parallel/test-http-client-response-domain.js b/test/parallel/test-http-client-response-domain.js index 3034b1087e..5355a301e8 100644 --- a/test/parallel/test-http-client-response-domain.js +++ b/test/parallel/test-http-client-response-domain.js @@ -4,13 +4,8 @@ const assert = require('assert'); const http = require('http'); const domain = require('domain'); -var gotDomainError = false; var d; -process.on('exit', function() { - assert(gotDomainError); -}); - common.refreshTmpDir(); // first fire up a simple HTTP server @@ -22,15 +17,14 @@ var server = http.createServer(function(req, res) { server.listen(common.PIPE, function() { // create a domain d = domain.create(); - d.run(test); + d.run(common.mustCall(test)); }); function test() { - d.on('error', function(err) { - gotDomainError = true; + d.on('error', common.mustCall(function(err) { assert.equal('should be caught by domain', err.message); - }); + })); var req = http.get({ socketPath: common.PIPE, |