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 f1fb2be

Browse filesBrowse files
ggoforthMylesBorins
authored andcommitted
test: modernized test to use arrow functions
PR-URL: #23496 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 5a0b9fa commit f1fb2be
Copy full SHA for f1fb2be

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-dgram-send-callback-multi-buffer.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-dgram-send-callback-multi-buffer.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ const dgram = require('dgram');
66

77
const client = dgram.createSocket('udp4');
88

9-
const messageSent = common.mustCall(function messageSent(err, bytes) {
9+
const messageSent = common.mustCall((err, bytes) => {
1010
assert.strictEqual(bytes, buf1.length + buf2.length);
1111
});
1212

1313
const buf1 = Buffer.alloc(256, 'x');
1414
const buf2 = Buffer.alloc(256, 'y');
1515

16-
client.on('listening', function() {
17-
const port = this.address().port;
16+
client.on('listening', () => {
17+
const port = client.address().port;
1818
client.send([buf1, buf2], port, common.localhostIPv4, messageSent);
1919
});
2020

21-
client.on('message', common.mustCall(function onMessage(buf, info) {
21+
client.on('message', common.mustCall((buf, info) => {
2222
const expected = Buffer.concat([buf1, buf2]);
2323
assert.ok(buf.equals(expected), 'message was received correctly');
2424
client.close();

0 commit comments

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