diff --git a/test/parallel/test-net-localerror.js b/test/parallel/test-net-localerror.js index ed7c9471e03..184e55c890b 100644 --- a/test/parallel/test-net-localerror.js +++ b/test/parallel/test-net-localerror.js @@ -1,19 +1,19 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var net = require('net'); +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); connect({ host: 'localhost', port: common.PORT, localPort: 'foobar', -}, 'localPort should be a number: foobar'); +}, /^TypeError: "localPort" option should be a number: foobar$/); connect({ host: 'localhost', port: common.PORT, localAddress: 'foobar', -}, 'localAddress should be a valid IP: foobar'); +}, /^TypeError: "localAddress" option must be a valid IP: foobar$/); function connect(opts, msg) { assert.throws(function() {