Tobias Nießen
78e05da071
test: use shorthand properties
...
PR-URL: https://github.com/nodejs/node/pull/18105
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-01-30 10:25:24 -06:00
Calvin Metcalf
c5c4a534d1
stream: rm {writeable/readable}State.length
...
As part of the readableState/writableState mega issue #445 , this
removes all of the references to .length on those properties and
replaces them with a readableLength and writableLength getter.
See: https://github.com/nodejs/node/issues/445
PR-URL: https://github.com/nodejs/node/pull/12857
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-01-09 03:17:35 -05:00
James M Snell
63f9a13299
test: fix linting error
...
Fast-tracked on landing to unbreak CI
PR-URL: https://github.com/nodejs/node/pull/17251
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-12-12 03:27:14 -05:00
Lance Ball
5cfd4ea3ed
test: use arrow function instead of bind
...
Using an arrow function here eliminates the need to call `bind()`.
PR-URL: https://github.com/nodejs/node/pull/17202
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-12-12 03:27:13 -05:00
Gene Wu
c35a3e004e
test: use fixtures module in test-https-truncate
...
PR-URL: https://github.com/nodejs/node/pull/15875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-10-19 01:52:48 -02:00
Vse Mozhet Byt
2d2986ae72
test: simplify test skipping
...
* Make common.skip() exit.
Also add common.printSkipMessage() for partial skips.
* Don't make needless things before skip
PR-URL: https://github.com/nodejs/node/pull/14021
Fixes: https://github.com/nodejs/node/issues/14016
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-04 12:41:49 +03:00
Vse Mozhet Byt
8b76c3e60c
test: reduce string concatenations
...
PR-URL: https://github.com/nodejs/node/pull/12735
Refs: https://github.com/nodejs/node/pull/12455
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-05 17:39:05 +03:00
James M Snell
98e54b0bd4
meta: restore original copyright header
...
A prior io.js era commit inappropriately removed the
original copyright statements from the source. This
restores those in any files still remaining from that
edit.
Ref: https://github.com/nodejs/TSC/issues/174
Ref: https://github.com/nodejs/node/pull/10599
PR-URL: https://github.com/nodejs/node/pull/10155
Note: This PR was required, reviewed-by and approved
by the Node.js Foundation Legal Committee and the TSC.
There is no `Approved-By:` meta data.
2017-03-10 11:23:48 -08:00
Rich Trott
8bad37a547
test: refactor test-https-truncate
...
* use common.mustCall() where appropriate
* Buffer.allocUnsafe() -> Buffer.alloc()
* do crypto check before loading any additional modules
* specify 1ms duration for `setTimeout()`
PR-URL: https://github.com/nodejs/node/pull/10225
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2016-12-12 17:04:33 -05:00
davidmarkclements
a6ddd57f29
test: refactor test-https-truncate
...
Changes assert.equal to assert.strictEqual to ensure specificity.
Changes var declarations to const/let where appropriate.
PR-URL: https://github.com/nodejs/node/pull/10074
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2016-12-04 18:50:01 -08:00
Brian White
2bc7841d0f
test: use random ports where possible
...
This helps to prevent issues where a failed test can keep a bound
socket open long enough to cause other tests to fail with EADDRINUSE
because the same port number is used.
PR-URL: https://github.com/nodejs/node/pull/7045
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2016-06-10 22:30:55 -04:00
Jeremiah Senkpiel
52bae222a3
test: abstract skip functionality to common
...
The tap skipping output is so prevalent yet obscure in nature that we
ought to move it into it's own function in test/common.js
PR-URL: https://github.com/nodejs/node/pull/6697
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
2016-05-12 16:43:35 -04:00
James M Snell
85ab4a5f12
buffer: add .from(), .alloc() and .allocUnsafe()
...
Several changes:
* Soft-Deprecate Buffer() constructors
* Add `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()`
* Add `--zero-fill-buffers` command line option
* Add byteOffset and length to `new Buffer(arrayBuffer)` constructor
* buffer.fill('') previously had no effect, now zero-fills
* Update the docs
PR-URL: https://github.com/nodejs/node/pull/4682
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2016-03-16 08:34:02 -07:00
Rich Trott
fd395ba5c9
test: remove unused variables from HTTPS tests
...
PR-URL: https://github.com/nodejs/node/pull/4426
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
2015-12-28 20:05:48 -08:00
Sakthipriyan Vairamani
79c865a53f
test: changing process.exit to return while skipping tests
...
This patch uses `return` statement to skip the test instead of using
`process.exit` call.
PR-URL: https://github.com/nodejs/io.js/pull/2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
2015-07-20 15:50:42 +05:30
Rich Trott
7c79490bfb
test: only refresh tmpDir for tests that need it
...
Expose `common.refreshTmpDir()` and only call it
for tests that use common.tmpDir or common.PIPE.
A positive side effect is the removal of a code
smell where child processes were detected by the
presence of `.send()`. Now each process can decide
for itself if it needs to refresh tmpDir.
PR-URL: https://github.com/nodejs/io.js/pull/1954
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
2015-06-13 22:27:17 -07:00
Roman Reiss
f29762f4dd
test: enable linting for tests
...
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.
test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.
PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-05-19 21:21:27 +02:00
Johan Bergström
671fbd5a9d
test: refactor all tests that depends on crypto
...
we had a few ways versions of looking for support before executing a test. this
commit unifies them as well as add the check for all tests that previously
lacked them. found by running `./configure --without-ssl && make test`. also,
produce tap skip output if the test is skipped.
PR-URL: https://github.com/iojs/io.js/pull/1049
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2015-03-05 10:31:41 +09:00
isaacs
3e1b1dd4a9
Remove excessive copyright/license boilerplate
...
The copyright and license notice is already in the LICENSE file. There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
2015-01-12 15:30:28 -08:00
Fedor Indutny
0e19476595
test: split test in parallel/sequential
...
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
PR-URL: https://github.com/iojs/io.js/pull/172
Fix : iojs/io.js#139
2014-12-17 20:45:02 +07:00