Rich Trott
fb2f449acc
tools: update ESLint to current version
...
We have been stalled on ESLint 3.8.0 for some time. Current ESLint is
3.13.0. We have been unable to upgrade because of more aggressive
reporting on some rules, including indentation.
ESLint configuration options and bugfixes are now such that we can
reasonably upgrade.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-03-08 17:11:24 -08:00
Rich Trott
b4cf8c4036
benchmark,lib,test: adjust for linting
...
Formatting changes for upcoming linter update.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-03-08 17:11:24 -08:00
cjihrig
336f1bd842
test: increase setMulticastLoopback() coverage
...
PR-URL: https://github.com/nodejs/node/pull/11277
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:22 -08:00
cjihrig
b29165f249
test: increase dgram ref()/unref() coverage
...
This commit completes code coverage for dgram's Socket#ref() and
Socket#unref() methods.
PR-URL: https://github.com/nodejs/node/pull/11240
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:22 -08:00
Yuta Hiroto
22d4ed2484
test: add an exception test to http-write-head
...
* Add an exception test.
* Add `common.mustCall()`.
* Make use of Arrow function.
PR-URL: https://github.com/nodejs/node/pull/11034
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:11:22 -08:00
Rich Trott
646f82520c
test: guarantee test runs in test-readline-keys
...
Use common.mustCall() to guarantee that test functions (created by a
factory function) are run.
PR-URL: https://github.com/nodejs/node/pull/11023
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:21 -08:00
Alex Ling
d8eed12d31
test: check error message in test-http-outgoing-proto
...
PR-URL: https://github.com/nodejs/node/pull/10943
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:21 -08:00
Luigi Pinca
b4dc7a778f
http: make request.abort() destroy the socket
...
`request.abort()` did not destroy the socket if it was called
before a socket was assigned to the request and the request
did not use an `Agent` or a Unix Domain Socket was used.
Fixes: https://github.com/nodejs/node/issues/10812
PR-URL: https://github.com/nodejs/node/pull/10818
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-03-08 17:11:21 -08:00
abouthiroppy
174bef182a
test: increase coverage for stream's duplex
...
Make use of Arrow function.
Add a small test and this file's coverage is 100%.
https://github.com/nodejs/node/blob/a647d82f83ad5ddad5db7be2cc24c3d686121792/lib/_stream_duplex.js#L25
Coverage: https://coverage.nodejs.org/coverage-067be658f966dafe/root/_stream_duplex.js.html
PR-URL: https://github.com/nodejs/node/pull/10963
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-03-08 17:11:20 -08:00
Rich Trott
8ff15a262d
test: allow for slow hosts in spawnSync() test
...
test-child-process-spawnsync-timeout failed from time to time on
Raspberry Pi devices. Use common.platformTimeout() to allow a little
more time to run on resource-constrained hosts.
PR-URL: https://github.com/nodejs/node/pull/10998
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:11:20 -08:00
Vinícius do Carmo
62f6749cd6
test: expand test coverage of fs.js
...
* test reading a file passing a not valid enconding
Refs: https://coverage.nodejs.org/coverage-067be658f966dafe/root/internal/fs.js.html
PR-URL: https://github.com/nodejs/node/pull/10947
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-03-08 17:11:19 -08:00
Vinícius do Carmo
5cea2239d8
test: expand test coverage of events.js
...
* test else path in emitMany function
* test calling removeAllListeners() in a event emitter instance
with no events at all
* test calling removeListener() passing a event type that does
not exist
* test calling eventNames() in a event emitter instance
with no events at all
Refs: https://coverage.nodejs.org/coverage-ba776b3a56642d4c/root/events.js.html
PR-URL: https://github.com/nodejs/node/pull/10947
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-03-08 17:11:19 -08:00
larissayvette
a1751864e2
test: check noAssert option in buf.write*()
...
Add test to cover previously untested `noAssert` functionality in
buf.write*() functions.
PR-URL: https://github.com/nodejs/node/pull/10790
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-03-08 17:11:19 -08:00
Vinícius do Carmo
0b5f2b45f9
test: expand test coverage of fs.js
...
* test calling truncateSync() passing a file descriptor
* test calling truncate() passing undefined as the 2nd argument
Refs: https://coverage.nodejs.org/coverage-8ab561b2432bdae3/root/fs.js.html
(line 673 and 692)
PR-URL: https://github.com/nodejs/node/pull/10972
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:18 -08:00
Rich Trott
d9362efb6c
test: enhance test-timers
...
In test-timers, confirm that all input values that should be coerced to
1 ms are not being coerced to a significantly larger value.
This eliminates the need for the separate test-regress-GH-897.
PR-URL: https://github.com/nodejs/node/pull/10960
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:11:18 -08:00
cjihrig
b9615b3abc
test: increase coverage for exec() functions
...
This commit increases code coverage related to the stdout
and stderr outputs of the child_process exec() functions.
Previously, stdout was completely covered, but stderr was
not.
PR-URL: https://github.com/nodejs/node/pull/10919
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:17 -08:00
abouthiroppy
b45280671a
test: add process.assert's test
...
PR-URL: https://github.com/nodejs/node/pull/10911
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:17 -08:00
Brian White
db45bf850a
querystring: improve unescapeBuffer performance
...
PR-URL: https://github.com/nodejs/node/pull/10837
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:17 -08:00
Brian White
32cdbca2dc
querystring: improve stringify() performance
...
PR-URL: https://github.com/nodejs/node/pull/10852
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
2017-03-08 17:11:17 -08:00
dcposch@dcpos.ch
6584ea0715
test: update Buffer.lastIndexOf
...
Test type coercion for non-number offset arguments. Verify that Buffer
and String behave the same way.
PR-URL: https://github.com/nodejs/node/pull/10162
Fixes: https://github.com/nodejs/node/issues/9801
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-03-08 17:11:15 -08:00
Adrian Estrada
0c60540014
test: improve code in test-crypto-verify
...
* use common.mustCall to validate functions executions
* use common.fail to check test fail
* remove console.log
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10845
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:15 -08:00
abouthiroppy
2a52a68a96
test: add dgram.Socket.prototype.bind's test
...
Test that an error is thrown when bind() is called on an already bound
socket.
PR-URL: https://github.com/nodejs/node/pull/10894
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-03-08 17:11:15 -08:00
Franziska Hinkelmann
2494d8ac68
test: update V8 flag in test
...
--expose-debug-as is deprecated in V8, switch test-preload.js to a flag
that still exists.
PR-URL: https://github.com/nodejs/node/pull/10917
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-03-08 17:11:14 -08:00
abouthiroppy
9ac22cdcaf
test: increase coverage of string-decoder
...
Make use of Arrow Function.
Add normalizeencoding's test.
normalizeEncoding:
https://github.com/nodejs/node/blob/master/lib/string_decoder.js#L9
PR-URL: https://github.com/nodejs/node/pull/10863
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-03-08 17:11:14 -08:00
abouthiroppy
d766f5e0ad
test: improving coverage of dns-lookup
...
PR-URL: https://github.com/nodejs/node/pull/10844
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
2017-03-08 17:11:14 -08:00
abouthiroppy
8f984c3a8a
test: refactor test-fs-read-zero-length.js
...
PR-URL: https://github.com/nodejs/node/pull/10729
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:11:13 -08:00
abouthiroppy
c0e24f9029
test: improving coverage for dgram
...
PR-URL: https://github.com/nodejs/node/pull/10783
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:11:13 -08:00
Adrian Estrada
c91d873115
test: improve code in test-console-instance
...
* use common.mustCall to validate functions executions
* use common.fail to check test fail
* improve error validations
* remove unnecessary assertions
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10813
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:11:13 -08:00
Adrian Estrada
a434f451d9
test: improve code in test-domain-multi
...
* use common.mustCall to validate functions executions
* use common.fail to control error
* remove unnecessary variables
* remove unnecessary assertions
* remove console.log and console.error
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10798
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:11:13 -08:00
stefan judis
b01db3a73f
test: improve test-stream2-large-read-stall
...
* use const instead of var
* use assert.strictEqual instead of assert.equal
* use common.mustCall instead of process.on( 'exit', fn )
PR-URL: https://github.com/nodejs/node/pull/10725
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
2017-03-08 17:11:12 -08:00
Adrian Estrada
76f0556c4a
test: improve code in test-http-host-headers
...
* use common.fail to handle errors
* remove console.log
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10830
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:12 -08:00
abouthiroppy
c740cb6667
test: add test case to test-http-response-statuscode.js
...
Change regular expression of error message.
Add test case(`res.writeHead()`).
PR-URL: https://github.com/nodejs/node/pull/10808
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:11:12 -08:00
Adrian Estrada
04dc1cdfcb
test: improve test-fs-write-file-sync
...
* use let and const instead of var
* use assert.strictEqual instead of assert.equal
* swap assertions arguments to match the standard
PR-URL: https://github.com/nodejs/node/pull/10624
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:11 -08:00
Sam Roberts
0d25d056a4
test: test hmac binding robustness
...
The Hmac binding layer is not documented as part of the API, and is not
intended to be used, but it should be robust to misuse, and contains
defensive checks for misuse. This test checks that updates without init
throw (as opposed to abort or misbehave in some other way).
PR-URL: https://github.com/nodejs/node/pull/10923
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:11 -08:00
Joyee Cheung
c13f01c94d
test: reduce unmanaged parallelism in domain test
...
The original test lauches 10 child processes at once
and bypass `test.py`'s process regulation.
This PR reduces the unmanaged parallelism and is a
temporary workaround for #9979 (not a real fix).
PR-URL: https://github.com/nodejs/node/pull/10329
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-03-08 17:11:10 -08:00
abouthiroppy
ed76b4a8e9
test: add dgram.Socket.prototype.sendto's test
...
Refs: https://github.com/nodejs/node/blob/09ebdf14005cc948529b3f193ad550d5dfded26a/lib/dgram.js#L234
PR-URL: https://github.com/nodejs/node/pull/10901
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-03-08 17:11:10 -08:00
Michaël Zasso
5365501a2f
test: add regression test for V8 parse error
...
Refs: https://github.com/nodejs/node/issues/11480
PR-URL: https://github.com/nodejs/node/pull/11483
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2017-03-08 17:11:10 -08:00
Timothy Gu
9e6fcbb34c
url: fix surrogate handling in encodeAuth()
...
Currently, the legacy URL stringifier miscalculates the offset of an
extra surrogate, causing the high surrogate to be included unescaped:
> url.format({ auth: '\uD83D\uDE00', hostname: 'a' })
'//%F0%9F%98%80�@a'
PR-URL: https://github.com/nodejs/node/pull/11387
Backport-of: https://github.com/nodejs/node/pull/11161
2017-03-08 17:11:08 -08:00
richnologies
da874590a6
test: improve test-assert
...
Add RegExp to check assert throws the expected AssertionErrors.
For the one with multiple flags is ok to hardcode the flags since the
spec indicates the ordering will always be `gim`:
Refs: http://www.ecma-international.org/ecma-262/6.0/#sec-get-regexp.prototype.flags
PR-URL: https://github.com/nodejs/node/pull/10916
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:08 -08:00
abouthiroppy
a15ecd269d
test: increase coverage for punycode's decode
...
Added test cases for error.
PR-URL: https://github.com/nodejs/node/pull/10940
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:07 -08:00
John Barboza
98e32db207
test: check fd 0,1,2 are used, not access mode
...
Don't do a write on stdout/stderr because that checks for their
writability. But fd=1 could legitimately be opened with read-only
access by the user. All this test needs to ensure is that
they are used at startup.
PR-URL: https://github.com/nodejs/node/pull/10339
Fixes: https://github.com/nodejs/node/issues/10234
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:07 -08:00
Rich Trott
e59697c695
test: fix flaky test-regress-GH-897
...
Even after being moved to `sequential` in
1ce05ad540 , `test-regress-GH-897` still
was occasionally flaky on Raspberry Pi devices on CI.
The test is especially sensitive to resource constraints. It failed
reliably on my laptop if I moved it to `parallel` and ran 32 competing
node test processes. Even for a flaky test, that's unusually low. I
typically don't see problems, even for flaky tests, until I get up to
around four times that number.
On a Raspberry Pi, of course, that sensitivity to resource constraints
will manifest much sooner.
This change checks the order of timers firing, rather than the duration
before a timer is fired. This eliminates the sensitivity to resource
constraints. The test can now be moved back to `parallel`. I am able to
run many copies of the test simultaneously without seeing test failures.
PR-URL: https://github.com/nodejs/node/pull/10903
Fixes: https://github.com/nodejs/node/issues/10073
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:11:06 -08:00
Gibson Fahnestock
a08c7f6d87
test: don't connect to :: (use localhost instead)
...
If a test does http.listen(0) or net.listen(0),
http.listen(0).address().address returns '::'. Some machines will
resolve this to localhost, but not all. Every machine should have
localhost defined in /etc/hosts (or equivalent), so it should always
resolve.
Fixes: https://github.com/nodejs/node/issues/7291
PR-URL: https://github.com/nodejs/node/pull/10854
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michal Zasso <targos@protonmail.com >
2017-03-08 17:11:06 -08:00
Travis Meisenheimer
ca53866333
test: add message verification on assert.throws
...
Add regular expression for error message validation to instances of
assert.throws() in test-assert.js.
PR-URL: https://github.com/nodejs/node/pull/10890
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:11:06 -08:00
Rich Trott
38b123c918
test: refactor test-repl-tab-complete
...
* Add check for `data` object in tab completion callback
* Replace `.indexOf()` with `.startsWith()` where appropriate
PR-URL: https://github.com/nodejs/node/pull/10879
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 >
2017-03-08 17:11:05 -08:00
Rich Trott
68fc4d3a1c
test: simplify array initialization
...
PR-URL: https://github.com/nodejs/node/pull/10860
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:11:05 -08:00
abouthiroppy
a26d752e77
test: add http-common's test
...
PR-URL: https://github.com/nodejs/node/pull/10832
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:11:05 -08:00
Mark
80e2ff9bff
test: tests for _readableStream.awaitDrain
...
Fixes: https://github.com/nodejs/node/issues/8684
PR-URL: https://github.com/nodejs/node/pull/8914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-03-08 17:11:04 -08:00
Rich Trott
ccb6045f2d
crypto,tls: fix mutability of return values
...
If you alter the array returned by `tls.getCiphers()`,
`crypto.getCiphers()`, `crypto.getHashes()`, or `crypto.getCurves()`, it
will alter subsequent return values from those functions.
```js
'use strict';
const crypto = require('crypto');
var hashes = crypto.getHashes();
hashes.splice(0, hashes.length);
hashes.push('some-arbitrary-value');
console.log(crypto.getHashes()); // "['some-arbitrary-value']"
```
This is surprising. Change functions to return copy of array instead.
PR-URL: https://github.com/nodejs/node/pull/10795
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-03-08 17:11:03 -08:00
Adrian Estrada
e4e9f675d2
test: improve the code in test-process-cpuUsage
...
* validate the errors for assert.throws
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10714
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:03 -08:00