From cb74830a9882ec0b6c505282820d5a7098258cc2 Mon Sep 17 00:00:00 2001 From: sujunfei Date: Sun, 28 Apr 2019 17:05:52 +0800 Subject: [PATCH] test: add mustCall for parallel/test-net-connect-paused-connection Add common.mustCall test on net.createServer callback and listen callback in the parallel/test-net-connect-paused-connection remove the mustCall of net.createServer callback --- test/parallel/test-net-connect-paused-connection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-net-connect-paused-connection.js b/test/parallel/test-net-connect-paused-connection.js index a53177ed4c7e7e..801bba1cf5b2be 100644 --- a/test/parallel/test-net-connect-paused-connection.js +++ b/test/parallel/test-net-connect-paused-connection.js @@ -26,8 +26,8 @@ const net = require('net'); net.createServer(function(conn) { conn.unref(); -}).listen(0, function() { +}).listen(0, common.mustCall(function() { net.connect(this.address().port, 'localhost').pause(); setTimeout(common.mustNotCall('expected to exit'), 1000).unref(); -}).unref(); +})).unref();