* Use `common.mustCall` for all callbacks
* Use `const` instead of `var`
PR-URL: https://github.com/nodejs/node/pull/9876
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9874
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Change var to const.
PR-URL: https://github.com/nodejs/node/pull/10055
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Replaces the use of assert.equal() with assert.strictEqual in test
code.
PR-URL: https://github.com/nodejs/node/pull/9935
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Use const instead of var for assignments.
PR-URL: https://github.com/nodejs/node/pull/9951
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Remove console statements and prefer strictEqual() over equal()
in assertions.
PR-URL: https://github.com/nodejs/node/pull/9887
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Make change in test file from var to const/let.
PR-URL: https://github.com/nodejs/node/pull/10018
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
- updated vars to const
- add common.mustCall() to setup callback
PR-URL: https://github.com/nodejs/node/pull/9960
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Update var to const.
PR-URL: https://github.com/nodejs/node/pull/10056
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
- Updated references of var to const
- Updated assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9992
Reviewed-By: Rich Trott <rtrott@gmail.com>
Update `var` to `const`
PR-URL: https://github.com/nodejs/node/pull/10007
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Updated test-cluster-shared-handle-bind-privileged-port test
method to use assert.strictEqual() instead of assert.equal()
PR-URL: https://github.com/nodejs/node/pull/10042
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
- use assert.strictEqual instead of assert.equal
- add regexp for assert.throws
PR-URL: https://github.com/nodejs/node/pull/9883
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
var -> let/const
.equal -> .strictEqual
PR-URL: https://github.com/nodejs/node/pull/9913
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Add a test for cancelling timers with null or no arguments.
PR-URL: https://github.com/nodejs/node/pull/10068
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit changes calls to `assert.equal()` to `assert.strictEqual()`.
PR-URL: https://github.com/nodejs/node/pull/9872
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Adds a test for when an invalid http method is passed into
http.request() to verify an error is thrown, that the
error is the correct type, and the error message is correct.
PR-URL: https://github.com/nodejs/node/pull/10080
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
- changed var to const
- changed assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9885
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
change var to const or let
change assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Adds tests for the case in which listeners() is invoked on a
EventEmitter with no events.
Adds a new test case for the situation in which a class
inherits from the EventEmitter but overrides the constructor
in the EventEmitter so that the _events is never set.
PR-URL: https://github.com/nodejs/node/pull/9865
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
* Add RegExp arguments to throws assertions.
* Use common.mustCall for emitter callback.
PR-URL: https://github.com/nodejs/node/pull/9844
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Function declarations in the REPL are preprocessed into variable
declarations before being evaluated. However, the preprocessing logic
did not account for the star in a generator function declaration, which
caused the preprocessor to output invalid syntax in some circumstances.
PR-URL: https://github.com/nodejs/node/pull/9852
Fixes: https://github.com/nodejs/node/issues/9850
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Calling JS during GC is a no-no. So intead create a queue of all ids
that need to have their destroy() callback called and call them later.
Removed checking destroy() in test-async-wrap-uid because destroy() can
be called after the 'exit' callback.
Missing a reliable test to reproduce the issue that caused the
FATAL_ERROR.
PR-URL: https://github.com/nodejs/node/pull/9753
Fixes: https://github.com/nodejs/node/issues/8216
Fixes: https://github.com/nodejs/node/issues/9465
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Using NodeTodo I learned of a need to swap out the .equal function
with .strictEqual in a few test files.
https://twitter.com/NodeTodo/status/803657321993961472https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c
additional commits squashed:
.strictEqual's argument signature is actual, expected, [message].
Previously some statements were listed as expected, actual.
As asked in PR i swapped them to match the correct argument signature.
PR-URL: https://github.com/nodejs/node/pull/9842
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Enable cpplint for files in test/cctest. Fix up the style issues it
reports.
PR-URL: https://github.com/nodejs/node/pull/9787
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
- Add toUnicode and toASCII tests to test-punycode
- Refactor test-punycode.js to better organize test cases
- Change assert.equal to assert.strictEqual in test-punycode.js
PR-URL: https://github.com/nodejs/node/pull/9741
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* Handle a rejected Promise as that is expected to cause the process to
exit in a future version of Node.js. (Currently, it emits a warning.)
* Remove unneeded escaping in regexps
* Replace template strings with strings where there is no variable
substitution.
* A few minor readability changes (whitespace).
PR-URL: https://github.com/nodejs/node/pull/9804
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* assert.equal() -> assert.strictEqual()
* replace template string with a string; no variable substitution or
concatenation or anything like that
PR-URL: https://github.com/nodejs/node/pull/9803
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* replace unneeded template strings with strings; there was no variable
substitution or concatenation or anything like that
* assert.notEqual() -> assert.notStrictEqual()
PR-URL: https://github.com/nodejs/node/pull/9802
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* var -> const.
* Group and sort imports.
* Correctly align function arguments.
* Fix incorrect use of string instead of RegExp in `throws` assertions.
* assert.equal -> assert.strictEqual.
* Verify that callbacks are called with common.mustCall.
PR-URL: https://github.com/nodejs/node/pull/9810
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
* var -> const.
* Group and sort imports.
* Replace use of the deprecated crypto.createCredentials.
* Fix incorrect use of string instead of RegExp in `throws` assertions.
* Clone array with `.slice()` and remove dependency on util.
* assert.notEqual -> assert.notStrictEqual.
* indexOf -> includes.
PR-URL: https://github.com/nodejs/node/pull/9807
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
lib/constants.js was incorrectly copying the constants from the
binding, by copying from `contants.os.errors` instead of
`constants.os.errno`.
PR-URL: https://github.com/nodejs/node/pull/9349
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Fix incorrect use of string instead of RegExp in `throws` assertions.
PR-URL: https://github.com/nodejs/node/pull/9809
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* var -> const.
* Verify that callbacks are called with common.mustCall.
* Replace usage of deprecated `server.connections`.
* Use common.fail instead of rethrowing errors.
* Remove console.log statements.
* assert.equal -> assert.strictEqual.
* Correct order of arguments in assert.strictEqual.
PR-URL: https://github.com/nodejs/node/pull/9812
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* More precise length assertion.
* Fix incorrect use of string instead of RegExp in `throws` assertions.
* Add missing RegExp to `throws` assertions.
PR-URL: https://github.com/nodejs/node/pull/9811
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This reverts commit f2fe5583c4
(https://github.com/nodejs/node/pull/8169) as the original
justification for the runtime-deprecation does not appear
to justify the disruption to Node’s existing ecosystem.
Futhermore, the possibility of deprecating the Buffer constructor
entirely in v8.0 might lead to people having to change their code twice.
PR-URL: https://github.com/nodejs/node/pull/9529
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
* assert.equal -> assert.strictEqual.
* Fix incorrect use of string instead of RegExp in `throws` assertions.
PR-URL: https://github.com/nodejs/node/pull/9808
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>