Commit Graph
15525 Commits
Author SHA1 Message Date
iamchenxin ca9784e358 doc: fix typo for decipher.final.
The `output_encoding` parameter should be as the same as
`decipher.update`.

PR-URL: https://github.com/nodejs/node/pull/10086
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-12-05 00:38:56 +01:00
JDHarmon a90bcfea41 test: use strictEqual in cwd-enoent
Changed all references from assert.Equal() to assert.strictEqual().

PR-URL: https://github.com/nodejs/node/pull/10077
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-12-05 00:34:45 +01:00
Jonathan Darling e00c4bf233 test: refactor test-fs-read-stream-inherit.js
* convert assert.equal to assert.strictEqual
* convert var to const/let

PR-URL: https://github.com/nodejs/node/pull/9894
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-04 15:32:22 -08:00
Wes Tyler 948ee111a5 test: refactor test-child-process-stdio-inherit
assert.equal() -> assert.strictEqual()

PR-URL: https://github.com/nodejs/node/pull/9893
Reviewed-By: Santiago Gimeno <santiago.gimeno@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-04 15:28:06 -08:00
Harish Tejwani efdaeb0c05 test: change var to const for require and strict equality checks
PR-URL: https://github.com/nodejs/node/pull/9892
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-04 15:23:54 -08:00
Daniel Flores 4a204ee24c test: Update to const and use regex for assertions
Use const over var.

Assert error message with regex.

PR-URL: https://github.com/nodejs/node/pull/9891
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-04 15:20:47 -08:00
Peter Masucci f9274f072c test: swap var->const/let and equal->strictEqual
Change instances of var with const/let.
Change assert.equal to assert.strictEqual.

PR-URL: https://github.com/nodejs/node/pull/9888
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-04 15:15:06 -08:00
Julian Duque a8c2bece2e test: replace equal with strictEqual in crypto
Replace assert.equal with assert.strictEqual in
crypto cipher-decipher test

PR-URL: https://github.com/nodejs/node/pull/9886
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-04 15:03:31 -08:00
Julian Duque 318f34543c test: replace equal with strictEqual
Replace assert.equal with assert.strictEqual

PR-URL: https://github.com/nodejs/node/pull/9879
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>
2016-12-04 15:00:52 -08:00
rajatk 639ddcbe47 test: var to const/let in test-tls-set-ciphers
this change is part of code and learn (NINA-2016)

PR-URL: https://github.com/nodejs/node/pull/9877
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@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>
2016-12-04 14:56:39 -08:00
Devon Rifkin 7a38e49341 test: refactor test-tls-timeout-server-2
* 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>
2016-12-04 14:50:42 -08:00
Matt Webb f560933fe4 test: Updating vars to const and tsl server test
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>
2016-12-04 14:46:20 -08:00
Matt Wilson c0c67c953f test: refactor test-crypto-hash-stream-pipe
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>
2016-12-04 10:48:34 -08:00
Mitchell Stoutin 1a83b194b3 test: crypto-hash-stream-pipe use strict equal
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>
2016-12-04 10:45:46 -08:00
Johnny Reading 5be66db688 test: refactor child-process-spawn-error
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>
2016-12-04 09:49:48 -08:00
stokingerl 9dcf07a366 test: refactor test-child-process-spawn-error
Change instances of assert.equal to assert.strictEqual.

PR-URL: https://github.com/nodejs/node/pull/9937
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-04 08:56:06 -08:00
David Bradford 1a324f2b85 test: refactor test-vm-static-this.js
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>
2016-12-04 10:35:30 -05:00
Aileen 07ef682c51 test: refactor test-crypto-cipheriv-decipheriv
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>
2016-12-04 06:54:55 -08:00
Franziska Hinkelmann b5453ee7b8 deps: cherry-pick 08377af from v8 upstream
Orignial commit message:

[crankshaft] No need to rely on the @@hasInstance protector.

In Crankshaft we can actually do an abstract interpretation of the
@@hasInstance lookup when optimizing instanceof and then use the
normal machinery to protect the result instead of relying on the
global @@hasInstance protector cell for optimizations.

This recovers the 100x performance drop in Node.js v7 reported in
https://github.com/nodejs/node/issues/9634. This patch should be
easily back-mergable to Node.js v7.

BUG=v8:5640
R=yangguo@chromium.org,franzih@chromium.org

Committed: https://crrev.com/08377af957b1602396ebf3e11ae000f15ed09333
Cr-Commit-Position: refs/heads/master@{#41059}

PR-URL: https://github.com/nodejs/node/pull/9730
Fixes: https://github.com/nodejs/node/issues/9634
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2016-12-04 15:38:15 +01:00
Julian Duque 5486867e00 test: refactor test for crypto cipher/decipher iv
Replace assert.equal with assert.strictEqual.

PR-URL: https://github.com/nodejs/node/pull/9943
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-12-03 22:35:04 -08:00
Oscar Martinez 33435d5947 test: refactor test-cluster-setup-master-argv
- 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>
2016-12-03 22:02:48 -08:00
Christine Hong 3f1973372b test: refactor test-cluster-setup-master-argv
Change assert.equal to assert.strictEqual.

PR-URL: https://github.com/nodejs/node/pull/9993
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-03 21:35:37 -08:00
Chris Bystrek 310f6033fc test: refactor test-fs-append-file-sync
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>
2016-12-03 21:13:06 -08:00
Ian White 62f4b777af test: refactor test-fs-append-file-sync
Change instances of `asset.equal` to `assert.strictEqual`.

PR-URL: https://github.com/nodejs/node/pull/9977
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-03 21:08:15 -08:00
Daniel Pittman 99a3b63859 test: use assert.strictEqual in test-crypto-ecb
Updated test-crypto-ecb.js to change assert.equal
to assert.strictEqual.

PR-URL: https://github.com/nodejs/node/pull/9980
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-12-03 20:26:06 -08:00
adelmann 8a959107c0 test: refactor test-fs-write-file
Replaced all error checks with assert.ifError(e).

PR-URL: https://github.com/nodejs/node/pull/10030
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-12-03 20:03:32 -08:00
Kyle Carter 451f88e428 test: refactor test/parallel/test-fs-write-file.js
- 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>
2016-12-03 19:59:23 -08:00
Greg Valdez cc4e5e1a2c test: update to const iin cluster test
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>
2016-12-03 19:16:25 -08:00
Bidur Adhikari 4a63fa3bf9 test: use assert.strictEqual() cluster test
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>
2016-12-03 19:14:17 -08:00
Greg Valdez 7837866923 test: use const in test-crypto-pbkdf2
Updated all remaining var to const

PR-URL: https://github.com/nodejs/node/pull/9974
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-12-03 16:14:23 -08:00
joyeecheung aeec621017 test: improve test for crypto pbkdf2
- 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>
2016-12-03 15:42:31 -08:00
Teddy Katz ad6a6450c9 doc: suggest Buffer.alloc instead of Buffer#fill
Now that `Buffer.alloc` exists, there is no reason to recommend using
`new Buffer(size).fill(0)` or `Buffer.allocUnsafe(size).fill(0)`.

PR-URL: https://github.com/nodejs/node/pull/10000
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-03 18:27:58 -05:00
shiya 3401cad980 test: var -> let/const, .equal -> .strictEqual
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>
2016-12-03 15:05:43 -08:00
lrlna e21e12944c test: increase coverage for timers
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>
2016-12-03 14:26:51 +01:00
Wes Tyler 384dafe4c9 doc: clarify fs.createReadStream options
* start/end start *counting* at 0
* If fd is specified and start is omitted or undefined,
  fs.createReadStream() reads sequentially from the current file
  position.

Fixes: https://github.com/nodejs/node/issues/7099
PR-URL: https://github.com/nodejs/node/pull/10078
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-12-03 14:21:15 +01:00
Kevin Zurawel 228a32bfd6 test: change equal to strictEqual
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>
2016-12-03 14:14:51 +01:00
Vse Mozhet Byt 7be1f186aa doc: var => const in js code examples of addons.md
PR-URL: https://github.com/nodejs/node/pull/10092
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-12-03 14:12:50 +01:00
Ashton Kinslow c5ccc50d1f test: test for http.request() invalid method error
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>
2016-12-03 11:52:00 +01:00
scalkpdev c0d11752d9 test: update net-local-address-port
- 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>
2016-12-03 11:32:02 +01:00
Adriana Rios efa84563f2 test: refactor test-tls-ecdh
clear out const/let
change assert.notEqual to assert
move assert after common.hasCrypto check

PR-URL: https://github.com/nodejs/node/pull/9878
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-12-03 11:13:05 +01:00
makenova 8892433792 test: refactor test-vm-debug-context
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>
2016-12-03 10:57:00 +01:00
Safia Abdalla 947baaf5b7 doc: rename writing_tests.md to writing-tests.md
The writing_tests.md file did not utilize kebab-case as the other files
in the directory did.

PR-URL: https://github.com/nodejs/node/pull/9867
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-12-03 10:45:27 +01:00
Safia Abdalla a912b791d4 test: increase coverage for lib/events.js
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>
2016-12-02 20:45:13 -08:00
Walter Beller-Morales 20fa6e7d07 lib: use === in _http_server and _tls_wrap
Minor fix to favor strict equality in http_server.js and tls_wrap.js
to ensure accurate comparisons without type coercion.

PR-URL: https://github.com/nodejs/node/pull/9849
Reviewed-By: Rich Trott <rtrott@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>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-12-02 19:36:38 -06:00
ben_cripps 8e1e15f163 test: use strictEqual in test-zlib-truncated
PR-URL: https://github.com/nodejs/node/pull/9858
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-12-02 18:47:03 -06:00
ben_cripps 4658d0c8ce test: use strictEqual in test-debugger-client.js
PR-URL: https://github.com/nodejs/node/pull/9857
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-12-02 18:40:48 -06:00
Devon Rifkin 479822c45e doc: it’s -> its in api/child_process.md
PR-URL: https://github.com/nodejs/node/pull/10090
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-12-02 11:12:41 -06:00
Rich Trott 22752a36cd doc: update Collaborators list in README
The Collaborators list in the README has a couple entries of people that
have left the Collaborators team in GitHub. This updates the list in the
README accordingly.

PR-URL: https://github.com/nodejs/node/pull/9846
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-02 09:08:47 -06:00
Rich Trott cf2562bf60 test: refactor test-debug-args
* indexOf() -> includes()
* var -> const

PR-URL: https://github.com/nodejs/node/pull/9833
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-02 09:06:42 -06:00
Rich Trott 98f9b5df12 doc: remove minor contradiction in debugger doc
The doc says the debugger is and also isn't full-featured. Even if the
sentences are talking about different things, it's confusing.
`full-featured` seems superfluous in the first sentence anyway, so
remove it. Remove a superfluous `simple` while we're at it.

PR-URL: https://github.com/nodejs/node/pull/9832
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-12-02 08:56:51 -06:00