Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bf20cf8

Browse filesBrowse files
annatangzhaoMylesBorins
authored andcommitted
test: change to arrow functions in send-bad-arguments
PR-URL: #23483 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
1 parent 26f356f commit bf20cf8
Copy full SHA for bf20cf8

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-dgram-send-bad-arguments.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-dgram-send-bad-arguments.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ const buf = Buffer.from('test');
2828
const host = '127.0.0.1';
2929
const sock = dgram.createSocket('udp4');
3030

31-
assert.throws(function() {
31+
assert.throws(() => {
3232
sock.send();
3333
}, TypeError); // First argument should be a buffer.
3434

3535
// send(buf, offset, length, port, host)
36-
assert.throws(function() { sock.send(buf, 1, 1, -1, host); }, RangeError);
37-
assert.throws(function() { sock.send(buf, 1, 1, 0, host); }, RangeError);
38-
assert.throws(function() { sock.send(buf, 1, 1, 65536, host); }, RangeError);
36+
assert.throws(() => { sock.send(buf, 1, 1, -1, host); }, RangeError);
37+
assert.throws(() => { sock.send(buf, 1, 1, 0, host); }, RangeError);
38+
assert.throws(() => { sock.send(buf, 1, 1, 65536, host); }, RangeError);
3939

4040
// send(buf, port, host)
41-
assert.throws(function() { sock.send(23, 12345, host); }, TypeError);
41+
assert.throws(() => { sock.send(23, 12345, host); }, TypeError);
4242

4343
// send([buf1, ..], port, host)
44-
assert.throws(function() { sock.send([buf, 23], 12345, host); }, TypeError);
44+
assert.throws(() => { sock.send([buf, 23], 12345, host); }, TypeError);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.