Adam Langley
44510197dd
crypto: freelist_max_len is gone in OpenSSL 1.1.0
...
The freelist_max_len member of SSL* (and the freelist itself) has been
removed in OpenSSL 1.1.0. Thus this change will be necessary at some
point but, for now, it makes it a little easier to build with 1.1.0
without breaking anything for previous versions of OpenSSL.
PR-URL: https://github.com/nodejs/node/pull/10859
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org >
2017-03-08 17:11:06 -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
Faiz Halde
5118e05b15
doc: HTTP response getHeader doc fix
...
According to https://github.com/nodejs/node/issues/10803
getHeader need not be called only before it is flushed implicitly.
PR-URL: https://github.com/nodejs/node/pull/10817
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@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
Daniel Bevenius
2d31fd8bf7
build: move source files from headers section
...
Currently, the sources list contains sources and headers which are
separated by a comment. I noticed two .cc files after the headers
comment and this commit moves those files the start of the list
where the rest of source files are.
PR-URL: https://github.com/nodejs/node/pull/10850
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
2017-03-08 17:11:04 -08:00
Jackson Tian
bde1a7e09e
lib: remove unnecessary parameter for assertCrypto()
...
The `exports` parameter is unnecessary.
PR-URL: https://github.com/nodejs/node/pull/10834
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <sam@strongloop.com >
2017-03-08 17:11:04 -08:00
Stewart X Addison
b7c5295437
build: don't squash signal handlers with --shared
...
An application using node built as a shared library may legitimately
implement its own signal handling routines. Current behaviour is
to squash all signal handlers on node startup. This change will
stop that behaviour when node is built as a shared library.
PR-URL: https://github.com/nodejs/node/pull/10539
Fixes: https://github.com/nodejs/node/issues/10520
Refs: https://github.com/nodejs/node/pull/615
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
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
Rich Trott
73c0c46cf2
test: increase test-crypto.js strictness
...
Confirm that `getCiphers()` contains no duplicates.
PR-URL: https://github.com/nodejs/node/pull/10784
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:11:03 -08:00
Rich Trott
4a87aee532
test,util: remove lint workarounds
...
Remove assignments to `SIMD` that are only to pacify ESLint. Instead,
use either `global.SIMD` or provide an comment letting ESLint know in
cases where `SIMD` is guaranteed to be a defined global identifier.
PR-URL: https://github.com/nodejs/node/pull/10785
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:03 -08:00
larissayvette
e316fafbd4
test: delete duplicate test of noAssert in readUInt*
...
PR-URL: https://github.com/nodejs/node/pull/10791
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-03-08 17:11:02 -08:00
abouthiroppy
896fb63173
test: add http_incoming's matchKnownFields test
...
https://github.com/nodejs/node/blob/master/lib/_http_incoming.js#L136
Coverage: https://coverage.nodejs.org/coverage-57f6a106fbc69a47/root/_http_incoming.js.html
PR-URL: https://github.com/nodejs/node/pull/10811
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
2017-03-08 17:11:02 -08:00
Rich Trott
73283060ad
test,repl: add coverage for repl .clear+useGlobal
...
Add a test to cover situation where REPL is initialized with `useGlobal`
set to `true` and `.clear` is called. This adds coverage for code in
repl.js that is not currently covered.
Includes minor refactor of rocket functions in repl.js for concision.
PR-URL: https://github.com/nodejs/node/pull/10777
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:11:02 -08:00
Joyee Cheung
53213004eb
util: improve readability of normalizeEncoding
...
* Improve readability of util.normalizeEncoding
and add some comments
* Add a benchmark for util.normalizeEncoding
PR-URL: https://github.com/nodejs/node/pull/10439
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-03-08 17:11:02 -08:00
Irene Li
c086bdc2de
test: check error msg test-writeint.js
...
PR-URL: https://github.com/nodejs/node/pull/10755
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
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:01 -08:00
Rich Trott
a2aa2f7de4
lib: refactor bootstrap_node.js regular expression
...
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()
PR-URL: https://github.com/nodejs/node/pull/10749
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Jackson Tian <shyvo1987@gmail.com >
2017-03-08 17:11:01 -08:00
Javis Sullivan
243652abbe
doc: remove duplicate properties bullet in readme
...
PR-URL: https://github.com/nodejs/node/pull/10741
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:11:01 -08:00
istinson
2eb0c25aa1
test: no unused args test-fs-watch-file.js
...
PR-URL: https://github.com/nodejs/node/pull/10758
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:01 -08:00
Chase Starr
2f026f6668
test: improve tests in pummel/test-exec
...
* add asset.strictEqual to stdout and stderr. Fixes no-unused-vars.
* replace double quotes with single
PR-URL: https://github.com/nodejs/node/pull/10757
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:00 -08:00
Jackson Tian
dc88b6572d
readline: refactor construct Interface
...
Remove the dependency on the arguments.length.
PR-URL: https://github.com/nodejs/node/pull/4740
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-03-08 17:11:00 -08:00
Gibson Fahnestock
93877c87cc
test: fix temp-dir option in tools/test.py
...
If a temp-dir is specified and already exists, the NODE_TEST_DIR
environment variable will never be set. This fixes that.
PR-URL: https://github.com/nodejs/node/pull/10723
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:00 -08:00
Gibson Fahnestock
0f3677dd5d
test: use realpath for NODE_TEST_DIR in common.js
...
If you don't specify NODE_TEST_DIR, common.tmpDir will resolve to the
realpath of `node/test`.
If you do specify NODE_TEST_DIR (with the environment variable or by
running or by running tools/test.py --test-dir=x), common.tmpDir (which
is resolved from testRoot) uses the symbolic path (doesn't resolve
symlinks). This uses fs.realpathSync() to fix that.
PR-URL: https://github.com/nodejs/node/pull/10723
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-03-08 17:11:00 -08:00
Brian White
7ee04c6015
benchmark: don't lint autogenerated modules
...
PR-URL: https://github.com/nodejs/node/pull/10756
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-03-08 17:10:59 -08:00
Rich Trott
5d0cc617bb
test: move resource intensive test to sequential
...
test-fs-readfile-tostring-fail is resource-intensive and is flaky in
CI. Move to sequential tests so it is not competing for resources with
other tests.
PR-URL: https://github.com/nodejs/node/pull/10744
Fixes: https://github.com/nodejs/node/issues/10742
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-03-08 17:10:59 -08:00
Alexey Orlenko
4358c6096c
src: enable writev for pipe handles on Unix
...
This commit enables writev for Unix Domain Sockets on supported
platforms thus enabling cork/uncork functionality for them and
improving IPC performance.
Fixes: https://github.com/nodejs/node/issues/5095
PR-URL: https://github.com/nodejs/node/pull/10677
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:59 -08:00
larissayvette
cd4bb067ad
test: add test for noAssert option in buf.read*()
...
PR-URL: https://github.com/nodejs/node/pull/10713
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:59 -08:00
adelmann
5b55689b2c
test: refactor test-crypto-padding-aes256
...
* replace var with const/let
* replace assert.equal() with assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/10622
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:10:58 -08:00
sivaprasanna
119e512db3
test: refactor the code of test-keep-alive.js
...
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions
* removed console.log statements
PR-URL: https://github.com/nodejs/node/pull/10684
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-03-08 17:10:58 -08:00
Rich Trott
797d9ee924
lib: refactor crypto cipher/hash/curve getters
...
* refactor internal util.filterDuplicateStrings() to eliminate unused
code paths
* `.indexOf()` -> `.includes()` in test
* more concise arrow functions
PR-URL: https://github.com/nodejs/node/pull/10682
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michal Zasso <targos@protonmail.com >
2017-03-08 17:10:58 -08:00
Nathan Friedly
ef3d889ee7
test: validate 'expected' argument to mustCall()
...
instead of silently overwriting invalid values with the default
PR-URL: https://github.com/nodejs/node/pull/10692
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michal Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-03-08 17:10:58 -08:00
Nathan Friedly
21704a3b6b
test: fix misplaced ) in http response statuscode test
...
This fixes a misplaced parenthesis in each of the tests in
test/parallel/test-http-response-statuscodes.js, causing the tests to
pass as long as any error was thrown, without validating the error
message.
PR-URL: https://github.com/nodejs/node/pull/10692
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michal Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-03-08 17:10:57 -08:00
abouthiroppy
8565a06b09
test: refactor test-doctool-html.js
...
PR-URL: https://github.com/nodejs/node/pull/10696
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:10:57 -08:00
Sam Roberts
fa8a394e51
doc: specify sorted requires in tests
...
And allow anchor links to the various sections, to more easily reference
them when reviewing PRs.
PR-URL: https://github.com/nodejs/node/pull/10716
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-03-08 17:10:57 -08:00
Adrian Estrada
168f3e4bf8
test: improve the code in test-process-hrtime
...
* use const instead of var
* use assert.strictEqual instead of assert.equal and plain assert
* use arrow functions
* swap assertions arguments to match the standard
* validate the error for assert.throws
PR-URL: https://github.com/nodejs/node/pull/10667
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michal Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:10:57 -08:00
sivaprasanna
9acc86f578
test: refactor test-watch-file.js
...
* use const and let instead of var
* use arrow function
* removed console.log statements
PR-URL: https://github.com/nodejs/node/pull/10679
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-03-08 17:10:56 -08:00
Michael Lefkowitz
86e39367d6
test: improve zlib-from-gzip-with-trailing-garbage
...
* use assert.strictEqual instead of assert.equal
* add RegExp in second argument of assert.throws
* validate error message and code
PR-URL: https://github.com/nodejs/node/pull/10674
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:10:56 -08:00
sivaprasanna
3135455cd9
test: refactor the code in test-child-process-spawn-loop.js
...
* use const and let instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10605
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:56 -08:00
cjihrig
f43a8765a2
test: allow testing uid and gid separately
...
This commit lets the uid and gid options of spawn() to be
tested independently of one another based on the user's uid
and gid.
Fixes: https://github.com/nodejs/node/issues/10646
PR-URL: https://github.com/nodejs/node/pull/10647
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-03-08 17:10:56 -08:00
Adrian Estrada
2f1d231c0d
test: improve test-http-chunked-304
...
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10462
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-03-08 17:10:55 -08:00
Adrian Estrada
ec8a9962ce
test: improve test-fs-readfile-zero-byte-liar
...
* use const instead of var
* use assert.strictEqual instead of assert.equal
* use arrow functions
PR-URL: https://github.com/nodejs/node/pull/10570
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:55 -08:00
Junshu Okamoto
12746af524
test: refactor test-fs-utimes
...
* favor `===` over `==`
* `var` -> `const`/`let`
* use `common.mustCall()`
PR-URL: https://github.com/nodejs/node/pull/9290
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:55 -08:00
Rich Trott
e4f7f5c630
tools: add lint rule to enforce timer arguments
...
Add a custom ESLint rule to require that setTimeout() and setInterval()
get called with at least two arguments. This prevents omitting the
duration or interval.
PR-URL: https://github.com/nodejs/node/pull/9472
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:55 -08:00
Rich Trott
e81b1cc1ae
test: provide duration/interval to timers
...
There are places in the code base where setTimeout() or
setInterval() are called with just a callback and no duration/interval.
The timers module will use a value of `1` in that situation.
An unspecified duration or interval can be confusing. Did the original
author forget to provide a value? Did they intend to use setImmediate()
or process.nextTick() instead of setTimeout()? And so on.
This change provides a duration or interval of `1` to all calls in the
codebase where it is missing. `parallel/test-timers.js` still tests the
situation where `setTimeout()` and `setInterval()` are called with
`undefined` and other non-numeric values for the duration/interval.
PR-URL: https://github.com/nodejs/node/pull/9472
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:54 -08:00
Adrian Estrada
17a63e15e6
test: improve test-event-emitter-modify-in-emit
...
* use let 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/10600
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-08 17:10:54 -08:00