-
Notifications
You must be signed in to change notification settings - Fork 30k
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,lib,benchmark: match function names #9113
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -304,7 +304,7 @@ proxiedMethods.forEach(function(name) { | |
}; | ||
}); | ||
|
||
tls_wrap.TLSWrap.prototype.close = function closeProxy(cb) { | ||
tls_wrap.TLSWrap.prototype.close = function close(cb) { | ||
if (this.owner) | ||
this.owner.ssl = null; | ||
|
||
|
@@ -340,10 +340,10 @@ TLSSocket.prototype._wrapHandle = function(wrap) { | |
res._secureContext = context; | ||
res.reading = handle.reading; | ||
Object.defineProperty(handle, 'reading', { | ||
get: function readingGetter() { | ||
get: function get() { | ||
return res.reading; | ||
}, | ||
set: function readingSetter(value) { | ||
set: function set(value) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
res.reading = value; | ||
} | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,7 +166,7 @@ const tests = [ | |
expected: [prompt, replFailedRead, prompt, replDisabled, prompt] | ||
}, | ||
{ // Make sure this is always the last test, since we change os.homedir() | ||
before: function mockHomedirFailure() { | ||
before: function before() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: shorthand syntax |
||
// Mock os.homedir() failure | ||
os.homedir = function() { | ||
throw new Error('os.homedir() failure'); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,7 +291,7 @@ const testCustomCompleterSyncMode = repl.start({ | |
prompt: '', | ||
input: putIn, | ||
output: putIn, | ||
completer: function completerSyncMode(line) { | ||
completer: function completer(line) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto here and on line 326. |
||
const hits = customCompletions.filter((c) => { | ||
return c.indexOf(line) === 0; | ||
}); | ||
|
@@ -323,7 +323,7 @@ const testCustomCompleterAsyncMode = repl.start({ | |
prompt: '', | ||
input: putIn, | ||
output: putIn, | ||
completer: function completerAsyncMode(line, callback) { | ||
completer: function completer(line, callback) { | ||
const hits = customCompletions.filter((c) => { | ||
return c.indexOf(line) === 0; | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using
get() {
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find that confusing to read. I will probably change my opinion as it becomes more common and I get used to seeing it. If there's a strong preference for it among others, I'll use it. But if left to my own devices, I prefer the explicit
key: value
format instead.