diff --git a/test/parallel/test-net-server-options.js b/test/parallel/test-net-server-options.js index db0054d7637d69..be7e40e49bf16f 100644 --- a/test/parallel/test-net-server-options.js +++ b/test/parallel/test-net-server-options.js @@ -3,5 +3,7 @@ require('../common'); const assert = require('assert'); const net = require('net'); -assert.throws(function() { net.createServer('path'); }, TypeError); -assert.throws(function() { net.createServer(0); }, TypeError); +assert.throws(function() { net.createServer('path'); }, + /^TypeError: options must be an object$/); +assert.throws(function() { net.createServer(0); }, + /^TypeError: options must be an object$/);