Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: refactor callback functions to arrow functions #23546

Closed
wants to merge 1 commit into from

Conversation

@seanhealy
Copy link
Contributor

commented Oct 12, 2018

Refactor callback functions to modern arrow functions.

Also, added common.mustCall to online callbacks.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
worker
.on('online', common.mustCall(() => worker.disconnect()))
.on(
'exit',

This comment has been minimized.

Copy link
@ChALkeR

ChALkeR Oct 12, 2018

Member

I suggest breaking the lines a bit differently, see e.g.

server.on('session', common.mustCall((session) => {
session.on('error', common.expectsError({
code: 'ERR_HTTP2_ERROR',
message: 'Protocol error'
}));
session.on('close', common.mustCall(() => server.close()));
}));

test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

@seanhealy seanhealy force-pushed the seanhealy:move-to-arrow-functions branch from 82ba036 to d3a8ae0 Oct 12, 2018

BridgeAR added a commit to BridgeAR/node that referenced this pull request Oct 15, 2018
test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

PR-URL: nodejs#23546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR added a commit to BridgeAR/node that referenced this pull request Oct 15, 2018
test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

PR-URL: nodejs#23546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeAR

This comment has been minimized.

Copy link
Member

commented Oct 15, 2018

Landed in f7a50f7 🎉

@seanhealy congratulations on your commit to Node.js!

@BridgeAR BridgeAR closed this Oct 15, 2018

burgerboydaddy added a commit to burgerboydaddy/node that referenced this pull request Oct 17, 2018
test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

PR-URL: nodejs#23546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
jasnell added a commit that referenced this pull request Oct 17, 2018
test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

PR-URL: #23546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
addaleax added a commit that referenced this pull request Oct 20, 2018
test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

PR-URL: #23546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins added a commit that referenced this pull request Oct 30, 2018
test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

PR-URL: #23546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@codebytere codebytere referenced this pull request Nov 27, 2018
rvagg added a commit that referenced this pull request Nov 28, 2018
test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

PR-URL: #23546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins added a commit that referenced this pull request Nov 29, 2018
test: refactor callback functions to arrow functions
Refactor callback functions to modern arrow functions.

Also, added `common.mustCall` to `online` callbacks.

PR-URL: #23546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@codebytere codebytere referenced this pull request Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.