Also updating assertStrict and moving the assert required.
PR-URL: https://github.com/nodejs/node/pull/9917
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
pass a regexp to assert.throws()
PR-URL: https://github.com/nodejs/node/pull/9924
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
changed equal to strictEqual in parallel/test-crypto-hash.js.
Added a second regex argument to the assert.throws function.
PR-URL: https://github.com/nodejs/node/pull/10009
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
* var => const
* assert test fixtures
PR-URL: https://github.com/nodejs/node/pull/9912
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
refactor all var to either const/let
change all assert.equal to assert.strictEqual
change all assert.ok(...===...) to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9970
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Changes assert.equal to assert.strictEqual in
two places and adds a second argument of 0
to setTimeout
PR-URL: https://github.com/nodejs/node/pull/9957
Reviewed-By: James M Snell <jasnell@gmail.com>
* changed vars to const
* changed assert.equal to assert.strictEqual
* added a common.mustCall in the childProcess.exec callback
* replaced 2 console.log strings with template strings for readability
* had to break up line 9 because it was causing a line max length (80)
listing err
PR-URL: https://github.com/nodejs/node/pull/9939
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Replace assert.equal() with assert.strictEqual().
PR-URL: https://github.com/nodejs/node/pull/9963
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
This improves the heuristic used in multiline-prompt mode to determine
whether a given slash character is at the beginning of a regular
expression.
PR-URL: https://github.com/nodejs/node/pull/10103
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: James M Snell <jasnell@keybase.io>
Fixes: https://github.com/nodejs/node/issues/9300
Changed var to const and equal to strictEqual
PR-URL: https://github.com/nodejs/node/pull/9982
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Changed equal to strictEqual
PR-URL: https://github.com/nodejs/node/pull/9982
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9919
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
refactor var -> const/let
refactor process.on('exit') into common.mustCall
PR-URL: https://github.com/nodejs/node/pull/9934
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* var -> const
* assert.equal() -> assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/9920
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* var => const
* assert.equal() => assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/10120
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* var -> const
* assert.equal() -> assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/9928
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Update vars to const/let & equal to strictEqual.
PR-URL: https://github.com/nodejs/node/pull/9927
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10011
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9921
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9926
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
converts an instance of assert.equal in a file already mostly
updated to use assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9925
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9936
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fix `buffer.transcode()` for transcoding from single-byte character
encodings to UCS2.
These would previously perform out-of-bounds reads due to an
incorrect `sizeof()` expression.
Fixes: https://github.com/nodejs/node/issues/9834
PR-URL: https://github.com/nodejs/node/pull/9838
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10035
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
implemented arrow functions and changed var to const where
appropriate.
PR-URL: https://github.com/nodejs/node/pull/9669
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Used assert.strictEqual() instead of assert.equal()
Passed a RegExp to assert.throws()
Broke lines to satisfy linting
PR-URL: https://github.com/nodejs/node/pull/9895
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Modernize `test/parallel/test-tls-peer-certificate.js` according to the
following rules:
* `var` --> `const`/`let`
* `assert.equal` --> `assert.strictEqual`
* `assert.ok(a === b)` --> `assert.strictEqual(a, b)`
PR-URL: https://github.com/nodejs/node/pull/10014
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
* change implicit string equal() compares to strictEqual compares of
buffer output (the slice output default)
* explicitly create buffers from utf8 inputs for the compare
PR-URL: https://github.com/nodejs/node/pull/10048
Reviewed-By: James M Snell <jasnell@gmail.com>
adds a basic test for process.stdin.setRawMode to ensure that the isRaw
property is properly changed
PR-URL: https://github.com/nodejs/node/pull/10037
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Replace var to const/let, use common.mustCall on callbacks and move
process.on('exit') to the .on('error') handler
PR-URL: https://github.com/nodejs/node/pull/10025
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/10001
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Replaced assert.equal to assert.strictEqual.
Fixed assert.throws syntax and added second argument
PR-URL: https://github.com/nodejs/node/pull/9998
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* Added more strict validations to properly test setEncoding
* Changed all var usage to const or let
* Changed assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9997
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
did this at nina 2016 na code and learn event
PR-URL: https://github.com/nodejs/node/pull/9996
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Use assert.strictEqual() instead of assert.equal()
PR-URL: https://github.com/nodejs/node/pull/9994
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
change var to const or let
change assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9991
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
- changed `var` to `const` where variables were not reassigned.
- changed `assert.equal` to `assert.strictEqual` because there was no
downside to being more rigorous.
PR-URL: https://github.com/nodejs/node/pull/9978
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* Replace variable defs using var with more up to date const/let.
* Updated tests to use strict equality to ensure type and value
comparision
* wrap callback functions in common.mustCall to ensure single execution
PR-URL: https://github.com/nodejs/node/pull/9968
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Give better stack traces for `PromiseRejectionHandledWarning`
and `UnhandledPromiseRejectionWarning`s.
For `PromiseRejectionHandledWarning`, when it is likely that there
is an `Error` object generated, it is created early to provide a
proper stack trace.
For `UnhandledPromiseRejectionWarning`, the stack trace of the
underlying error object is used, if possible.
Fixes: https://github.com/nodejs/node/issues/9523
PR-URL: https://github.com/nodejs/node/pull/9525
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Update test to use strictEqual instead of equal to remove error.
PR-URL: https://github.com/nodejs/node/pull/9930
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Changed var to ES6 syntax const/let.
Added common.mustCall function wrapper to all functions
called exactly once.
Changed assert.equal to assert.strictEqual.
PR-URL: https://github.com/nodejs/node/pull/9923
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>