4757 Commits
Author SHA1 Message Date
Deepti Agrawal 9726c8271e test: update parallel/test-crypto-hash.js
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>
2016-12-06 13:52:03 -05:00
Daryl Thayil 7144f811a6 test: add test for url module domainToAscii and domainToUnicode
PR-URL: https://github.com/nodejs/node/pull/10031
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 13:52:03 -05:00
Daryl Thayil 2f6d0c7e61 test: refactor test-require-extensions-main
* 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>
2016-12-06 13:52:02 -05:00
k3kathy e718f2051c test: refactor test-tls-ocsp-callback
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>
2016-12-06 13:52:02 -05:00
Matt Phillips f5e622ea53 test: use assert.strictEqual and fix setTimeout
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>
2016-12-06 13:52:01 -05:00
Danny Guo 0a4fc64c3f test: clean up tls junk test
PR-URL: https://github.com/nodejs/node/pull/9940
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 13:52:01 -05:00
scalkpdev a3a664a321 test: update test-stdout-to-file
* 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>
2016-12-06 13:52:01 -05:00
Paul Chin f531c96846 test: changed assert.Equal to asset.strictEqual
test-dgram-send-callback-recursive.js

PR-URL: https://github.com/nodejs/node/pull/9973
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-12-06 13:52:00 -05:00
Wes Tyler 843b8c1658 test: refactor test-domain-multi
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>
2016-12-06 13:52:00 -05:00
Teddy Katz a0f6cc718a repl: avoid parsing division operator as regex
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
2016-12-06 13:52:00 -05:00
hirabhullar 8936d835c1 test: refactor test-fs-write.js
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>
2016-12-06 13:51:59 -05:00
hirabhullar 2f731e5b5d test: refactor test-child-fork-exec-path.js
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>
2016-12-06 13:51:59 -05:00
Nigel Kibodeaux d697ac404f test: use assert.strictEqual in test-cli-eval
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>
2016-12-06 13:51:58 -05:00
Russell Sherman 0a07bccc5c test: refactor test-tls-connect-simple
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>
2016-12-06 13:51:58 -05:00
mark hughes 371a785f6d test: refactor test-signal-unregister
* 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>
2016-12-06 13:51:58 -05:00
Punit Buch 79b36e927c test: update test-net-connect-handle-econnrefused
* var -> const
* assert.equal() -> assert.strictEqual()
* assert.ok(false) -> common.fail()

PR-URL: https://github.com/nodejs/node/pull/9932
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 13:51:57 -05:00
blugavere ba7d1cf4bc test: refactor test-require-resolve
* 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>
2016-12-06 13:51:57 -05:00
Walter Beller-Morales 1877ba3384 test: refactor test-fs-symlink-dir-junction
* 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>
2016-12-06 13:51:57 -05:00
Matt Webb 84813fdaf8 test: refactor test-fs-read-stream-resume
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>
2016-12-06 13:51:56 -05:00
Tracy Hinds f68bfc5bde test: replace equal with strictEqual
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>
2016-12-06 13:51:56 -05:00
Uttam Pawar c0eb08adbe test: use strictEqual instead of equal
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>
2016-12-06 13:51:56 -05:00
Fabrice Tatieze 2e36b2ef49 test: using const and strictEqual
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>
2016-12-06 13:51:55 -05:00
Jonathan Darling 8e27254594 test: convert assert.equal to assert.strictEqual
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>
2016-12-06 13:51:55 -05:00
Scott Smereka 328cd93036 test: changed assert.equal to assert.strictEqual
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>
2016-12-06 13:51:54 -05:00
Richard Karmazin cbdc64e026 test: test-file-write-stream3.js refactor
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>
2016-12-06 13:51:54 -05:00
Erez Weiss 7c90244677 test: implemented es6 conventions
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>
2016-12-06 13:51:54 -05:00
J Scott Chapman bb677d41ce test: strictEqual() and RegExp in test-buffer-fill.js
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>
2016-12-06 13:51:53 -05:00
Ilya Potuzhnov 34b8c86895 test: Modernize test-tls-peer-certificate.js
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>
2016-12-06 13:51:52 -05:00
Michael Alexander 5ad7e04280 test: strictCompare and explcit inputs mprovement to test-buffer-slice
* 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>
2016-12-06 13:51:51 -05:00
Jonathan Darling 256de35c98 test: add test for process.stdin.setRawMode()
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>
2016-12-06 13:51:51 -05:00
Julian Duque 990a19fc7e test: refactor test for net listen on fd0
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>
2016-12-06 13:51:51 -05:00
Peter Diaz 7fd8833fa9 test: update assert.equal() to assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/10024
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 13:51:50 -05:00
Christopher Rokita fdc55ef02c test: use const or let and assert.strictEqual
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>
2016-12-06 13:51:50 -05:00
levsoroka ae1ef5336d test: fix buffer alloc tests
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>
2016-12-06 13:51:49 -05:00
Paul Lucas e8fc7fcef7 test: Added more validations to setEncoding
* 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>
2016-12-06 13:51:49 -05:00
cdnadmin 79e6068d5c test: use strictEqual() domain-http
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>
2016-12-06 13:51:49 -05:00
fmizzell 7428d80879 test: refactor test-cluster-worker-events
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>
2016-12-06 13:51:48 -05:00
makenova 6df3b7babc test: update repl tests
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>
2016-12-06 13:51:48 -05:00
Nigel Kibodeaux 47b5f9e710 test: modernize test-fs-truncate-fd
- 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>
2016-12-06 13:51:48 -05:00
rgoodwin 8b6c45f4b4 test: update tls test to use const/let and common.mustCall
* 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>
2016-12-06 13:51:47 -05:00
Eric Gonzalez c05909b3e8 test: adding strictEqual to test-buffer-indexof.js
PR-URL: https://github.com/nodejs/node/pull/9955
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 13:41:00 -05:00
CodeTheInternet d0852459d5 test: strictEqual in test-beforeexit-event.js
PR-URL: https://github.com/nodejs/node/pull/10004
Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-06 13:40:59 -05:00
Lance Ball dfa35d66f5 debugger: call this.resume() after this.run()
When the debugger has started we need to call `this.resume` otherwise,
the prompt won't appear.

Fixes: https://github.com/nodejs/node/issues/9854
PR-URL: https://github.com/nodejs/node/pull/10099
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-12-06 13:40:59 -05:00
Dan Villa 2beba9e025 test: refactor test-child-process-double-pipe
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>
2016-12-06 13:40:59 -05:00
Ethan Arrowood 64b2494e90 test: updated tls-getcipher test
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>
2016-12-06 13:40:58 -05:00
Adrian Estrada e502262687 test: replace equal with strictEqual in test-freelist.js
Improving asserts in test-freelist.js

PR-URL: https://github.com/nodejs/node/pull/9910
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-06 13:40:58 -05:00
Anna Henningsen 573f9db6c9 buffer: fix transcode for single-byte enc to ucs2
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>
2016-12-06 01:49:25 +01:00
Anna Henningsen cef3a04f62 promise: better stack traces for --trace-warnings
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>
2016-12-05 18:33:25 +01:00
Prince J Wesley 6087e361e5 repl: preprocess only for defaultEval
Code preprocessing is applicable only for default
eval function. Therefore, Moved `preprocess` function
invocation inside `defaultEval` function.

Fixes: https://github.com/nodejs/node/issues/9743
PR-URL: https://github.com/nodejs/node/pull/9752
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-12-05 11:10:21 -05:00
Sakthipriyan Vairamani (thefourtheye) 0c745e3a3a buffer: convert offset & length to int properly
As per ecma-262 2015's #sec-%typedarray%-buffer-byteoffset-length,
`offset` would be an integer, not a 32 bit unsigned integer. Also,
`length` would be an integer with the maximum value of 2^53 - 1, not a
32 bit unsigned integer.

This would be a problem because, if we create a buffer from an
arraybuffer, from an offset which is greater than 2^32, it would be
actually pointing to a different location in arraybuffer. For example,
if we use 2^40 as offset, then the actual value used will be 0,
because `byteOffset >>>= 0` will convert `byteOffset` to a 32 bit
unsigned int, which is based on 2^32 modulo.

This is a redo, as the ca37fa527f broke
CI.

Refer: https://github.com/nodejs/node/pull/9814
Refer: https://github.com/nodejs/node/pull/9492

PR-URL: https://github.com/nodejs/node/pull/9815

Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2016-12-05 11:10:21 -05:00