Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorA. Volgin <anatoly.volgin.rg@gmail.com>2019-12-21 00:22:15 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2019-12-25 13:58:29 +0300
commit643241ae3f5177572465f701ef9ed0d0f24ea4d0 (patch)
tree240f8a8e3d0c67c0411d1f6165b200394167c71b /lib
parent3885e157fa67715de65f4093bffdc552770cc502 (diff)
dgram: test to add and to drop specific membership
Test of addSourceSpecificMembership and dropSourceSpecificMembership for correct arguments with sourceAddress, groupAddress. PR-URL: https://github.com/nodejs/node/pull/31047 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/dgram.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/dgram.js b/lib/dgram.js
index b17def6cec9..26d1e1d11a0 100644
--- a/lib/dgram.js
+++ b/lib/dgram.js
@@ -856,13 +856,11 @@ Socket.prototype.addSourceSpecificMembership = function(sourceAddress,
healthCheck(this);
if (typeof sourceAddress !== 'string') {
- throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'sourceAddress',
- 'string');
+ throw new ERR_INVALID_ARG_TYPE('sourceAddress', 'string', sourceAddress);
}
if (typeof groupAddress !== 'string') {
- throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'groupAddress',
- 'string');
+ throw new ERR_INVALID_ARG_TYPE('groupAddress', 'string', groupAddress);
}
const err =
@@ -881,13 +879,11 @@ Socket.prototype.dropSourceSpecificMembership = function(sourceAddress,
healthCheck(this);
if (typeof sourceAddress !== 'string') {
- throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'sourceAddress',
- 'string');
+ throw new ERR_INVALID_ARG_TYPE('sourceAddress', 'string', sourceAddress);
}
if (typeof groupAddress !== 'string') {
- throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'groupAddress',
- 'string');
+ throw new ERR_INVALID_ARG_TYPE('groupAddress', 'string', groupAddress);
}
const err =