Gergely Nemeth
740ab3d0cb
test: add test for http outgoing internal headers
...
PR-URL: https://github.com/nodejs/node/pull/13980
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:03:02 -04:00
Zhang Weijie
7936f919c1
test: use regex error check in test-crypto-random
...
Replace constructor in assert.throws() to a regular expression to check
the error thrown in a test in test-crypto-random.
PR-URL: https://github.com/nodejs/node/pull/14273
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:03:02 -04:00
shaman
e650fe07f4
test: check error with regex in test-signal-safety
...
Change TypeError to a regular expression in assert.throws() in
test/parallel/test-signal-safety.js.
PR-URL: https://github.com/nodejs/node/pull/14285
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:03:01 -04:00
Ben Noordhuis
e3ed425da7
src: fix memory leak in DH key setters
...
Fix a memory leak in dh.setPublicKey() and dh.setPrivateKey() where the
old keys weren't freed.
Fixes: https://github.com/nodejs/node/issues/8377
PR-URL: https://github.com/nodejs/node/pull/14122
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:03:00 -04:00
Ben Noordhuis
814f4f1314
src: avoid heap allocation in hmac.digest()
...
Add a test that ensures the second call to .digest() returns an empty
HMAC, like it did before. No comment on whether that is the right
behavior or not.
PR-URL: https://github.com/nodejs/node/pull/14122
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:56 -04:00
Roee Kasher
442aa9e34b
http: OutgoingMessage change writable after end
...
When an OutgoingMessage is closed (for example, using the `end`
method), its 'writable' property should be changed to false - since it
is not writable anymore. The 'writable' property should have the
opposite value of the 'finished' property.
PR-URL: https://github.com/nodejs/node/pull/14024
Fixes: https://github.com/nodejs/node/issues/14023
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2017-07-19 15:02:51 -04:00
Superwoods
7fc04ae7c1
test: use regex error checks in test-util-format
...
Replace constructor with regular expression for second argument
to assert.throws() in test-util-format.
PR-URL: https://github.com/nodejs/node/pull/14299
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2017-07-19 15:02:48 -04:00
boydfd
5d06d0b607
test: change style in test-cli-bad-options
...
Replace string concatenation in test/parallel/test-cli-bad-options.js
with template literal. Adjust argument layout for readability.
PR-URL: https://github.com/nodejs/node/pull/14274
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2017-07-19 15:02:47 -04:00
xinglong.wangwxl
cb1c134422
test: improve regexps for error checking
...
test/parallel/test-catpto-random.js contains an object called
errorMesssage that contains regular expressions.They are only partially
matching regular expressions. Make them match the entire error message.
PR-URL: https://github.com/nodejs/node/pull/14271
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2017-07-19 15:02:46 -04:00
tobewhatwewant
b0946d07e0
test: use template literal for string concat
...
In test/parallel/test-repl-persistent-history.js, replace string
concatenation with a template literal.
PR-URL: https://github.com/nodejs/node/pull/14288
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:45 -04:00
jiangplus
36ef7e0b40
test: simplify string concatenation
...
Replace string concatenation with template literals.
Updated `test/parallel/test-http-multi-line-headers.js`
PR-URL: https://github.com/nodejs/node/pull/14278
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:44 -04:00
Bang Wu
1205b1246b
test: use regexp to confir error message
...
In test/parallel/test-stream-writable-null.js, use a regular expression
to validate error message in assert.throws() call.
PR-URL: https://github.com/nodejs/node/pull/14268
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:44 -04:00
akira.xue
8756686fa7
test: use regluar expression in vm test
...
update test/parallel/test-vm-create-context-arg.js
in line 27 to change `TypeError` to the regular expression
with the `/^TypeError: sandbox must be an object$/`.
PR-URL: https://github.com/nodejs/node/pull/14266
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:43 -04:00
Flandre
cb92035ba7
test: use regular expression to match error msg
...
PR-URL: https://github.com/nodejs/node/pull/14265
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:43 -04:00
Fraser Xu
7eafd966c2
test: check complete error message
...
In test-stream-writable-change-default-encoding, use a regular
expression to match the complete error message.
PR-URL: https://github.com/nodejs/node/pull/14264
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
2017-07-19 15:02:42 -04:00
Rich Trott
b2ac926c5d
test: fix flaky test-net-can-reset-timeout
...
Use `.once()` rather than `.on()` for timeout listener.
Add comment with URL for issue explaining the purpose of the test. (h/t
refack)
PR-URL: https://github.com/nodejs/node/pull/14257
Fixes: https://github.com/nodejs/node/issues/14241
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-07-19 15:02:41 -04:00
Refael Ackermann
7163e40337
test: make common.PIPE process unique
...
* includes a tiny bit of refactoring in adjacent lines.
* fixes 1 test and 1 benchmark that depended on PIPE being constant.
PR-URL: https://github.com/nodejs/node/pull/14168
Fixes: https://github.com/nodejs/node/issues/14128
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:41 -04:00
Peter Czibik
7a654eb418
test: http outgoing _renderHeaders
...
PR-URL: https://github.com/nodejs/node/pull/13981
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:39 -04:00
Evan Lucas
e726f529cc
test: decrease duration of test-cli-syntax
...
Previously, test/parallel/test-cli-syntax.js was spawning a lot of child
processes, but using spawnSync, which made the test run each child
process serially. This switches most of the test cases to use exec so
that they are asynchronous. Locally, the test went from > 5 seconds to
under 2 seconds.
PR-URL: https://github.com/nodejs/node/pull/14187
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:35 -04:00
Andreas Madsen
7f87876cb7
async_hooks: make AsyncResource match emitInit
...
AsyncResource previously called emitInitNative. Since AsyncResource is
just an abstraction on top of the emitEventScript functions, it should
call emitInitScript instead.
PR-URL: https://github.com/nodejs/node/pull/14152
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-07-19 15:02:33 -04:00
Ruben Bridgewater
3388e319fa
async_hooks: move restoreTmpHooks call to init
...
This fixes an error that could occure by nesting async_hooks calls
PR-URL: https://github.com/nodejs/node/pull/14054
Ref: https://github.com/nodejs/node/pull/13755#issuecomment-312616004
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-07-19 15:02:32 -04:00
Rich Trott
7827aa9549
test: reduce run time for test-benchmark-crypto
...
Specify options to reduce combinations of benchmarks run during testing.
This reduces the run time by approximately 30% and will hopefully allow
Raspberry Pi 1 devices in CI to finish the test.
PR-URL: https://github.com/nodejs/node/pull/14189
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-07-19 15:02:28 -04:00
Timothy Gu
6ddc0d6f24
querystring: fix up lastPos usage
...
Use lastPos ONLY for tracking what has been .slice()'d, never as an
indication of if key/value has been seen, since lastPos is updated on
seeing + as well.
PR-URL: https://github.com/nodejs/node/pull/14151
Fixes: https://github.com/nodejs/node/issues/13773
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-07-19 15:02:26 -04:00
Rich Trott
07a5b15bae
test: fix flaky test-https-set-timeout-server
...
Because of a race condition, connection listener may not be invoked if
test is run under load. Remove `common.mustCall()` wrapper from the
listener. Move the test to `parallel` because it now works under load.
Make similar change to http test to keep them in synch even though it is
much harder to trigger the race in http.
PR-URL: https://github.com/nodejs/node/pull/14134
Fixes: https://github.com/nodejs/node/issues/14133
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-07-19 15:02:25 -04:00
Rich Trott
7f2b5d305d
test: remove common.noop
...
This change removes `common.noop` from the Node.js internal testing
common module.
Over the last few weeks, I've grown to dislike the `common.noop`
abstraction.
First, new (and experienced) contributors are unaware of it and so it
results in a large number of low-value nits on PRs. It also increases
the number of things newcomers and infrequent contributors have to be
aware of to be effective on the project.
Second, it is confusing. Is it a singleton/property or a getter? Which
should be expected? This can lead to subtle and hard-to-find bugs. (To
my knowledge, none have landed on master. But I also think it's only a
matter of time.)
Third, the abstraction is low-value in my opinion. What does it really
get us? A case could me made that it is without value at all.
Lastly, and this is minor, but the abstraction is wordier than not using
the abstraction. `common.noop` doesn't save anything over `() => {}`.
So, I propose removing it.
PR-URL: https://github.com/nodejs/node/pull/12822
Backport-PR-URL: https://github.com/nodejs/node/pull/14174
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-19 15:02:25 -04:00
Evan Lucas
8887a5766d
test: add get/set effective uid/gid tests
...
3c92ca2b5c should have had tests
to go along with it. This adds tests for the following functions:
* `process.geteuid()`
* `process.seteuid()`
* `process.getegid()`
* `process.setegid()`
PR-URL: https://github.com/nodejs/node/pull/14091
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:23 -04:00
Sam Roberts
3cdaae29a5
src: whitelist v8 options with '_' or '-'
...
V8 options allow either '_' or '-' to be used in options as a seperator,
such as "--abort-on_uncaught-exception". Allow these case variations
when used with NODE_OPTIONS.
PR-URL: https://github.com/nodejs/node/pull/14093
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:23 -04:00
Refael Ackermann
628fc498d5
test: ignore connection errors for hostname check
...
PR-URL: https://github.com/nodejs/node/pull/14073
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-07-19 15:02:21 -04:00
XadillaX
fa3694fc58
doc,test: fs - reserved characters under win32
...
Explain the behavior of `fs.open()` under win32 that file path contains
some characters and add some test cases for them.
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
PR-URL: https://github.com/nodejs/node/pull/13875
Refs: https://github.com/nodejs/node/issues/13868
Refs: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
Refs: https://msdn.microsoft.com/en-us/library/windows/desktop/bb540537.aspx
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-07-19 15:02:19 -04:00
XadillaX
768ae5529d
repl: fix crash with large buffer tab completion
...
If the buffer or array is too large to completion, make a dummy smallest
substitute object for it and emit a warning.
PR-URL: https://github.com/nodejs/node/pull/13817
Fixes: https://github.com/nodejs/node/issues/3136
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-07-19 15:02:16 -04:00
Sam Roberts
a4f67f9243
src: --abort-on-uncaught-exception in NODE_OPTIONS
...
Allow --abort-on-uncaught-exception in NODE_OPTIONS, its useful to
enable for post-mortem debugging.
PR-URL: https://github.com/nodejs/node/pull/13932
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:12 -04:00
Rich Trott
5abe8c0693
test: restore no-op function in test
...
Remove common.mustCall() in test that might connect to a server already
running on the local host.
PR-URL: https://github.com/nodejs/node/pull/14065
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-07-19 15:02:07 -04:00
Rich Trott
e583e3b0b6
test: skip test-fs-readdir-ucs2 if no support
...
If the filesystem does not support UCS2, do not run the test.
PR-URL: https://github.com/nodejs/node/pull/14029
Fixes: https://github.com/nodejs/node/issues/14028
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2017-07-19 15:02:07 -04:00
Vse Mozhet Byt
bc99efc973
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-19 15:02:06 -04:00
Vse Mozhet Byt
898fe6135b
test: fix require nits in some test-tls-* tests
...
* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.
PR-URL: https://github.com/nodejs/node/pull/14008
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-19 15:02:06 -04:00
Rich Trott
1058556752
test: refactor test-http-hostname-typechecking
...
* Use common.mustCall() to confirm callback is invoked.
* Change spacing of require statements to conform to test-writing guide.
PR-URL: https://github.com/nodejs/node/pull/13993
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-07-19 15:02:05 -04:00
Alexey Orlenko
16a2f6865e
test: refactor test-http(s)-set-timeout-server
...
* Make changes to `test-https-set-timeout-server` to resolve
inconsistencies with its http counterpart:
- Apply the changes analogous to those in GH-13802 to the https test.
- Add a missing `common.mustCall()` wrapper.
- Make small stylistic changes (e.g., remove unnecessary line breaks
in comments) to make it visually consistent with the http test.
* Use arrow functions.
PR-URL: https://github.com/nodejs/node/pull/13935
Fixes: https://github.com/nodejs/node/issues/13588
Refs: https://github.com/nodejs/node/pull/13802
Refs: https://github.com/nodejs/node/pull/13625
Refs: https://github.com/nodejs/node/pull/13822
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-19 15:02:04 -04:00
Refael Ackermann
959bdfda44
http: guard against failed sockets creation
...
PR-URL: https://github.com/nodejs/node/pull/13839
Fixes: https://github.com/nodejs/node/issues/13045
Fixes: https://github.com/nodejs/node/issues/13831
Refs: https://github.com/nodejs/node/issues/13352
Refs: https://github.com/nodejs/node/issues/13548#issuecomment-307177400
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2017-07-19 15:02:04 -04:00
Rich Trott
602dd03231
test: refactor test-http-invalidheaderfield
...
* use common.mustNotCall() to confirm callback is not invoked
* whitespace change per test-writing guide
PR-URL: https://github.com/nodejs/node/pull/13996
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-07-19 15:02:03 -04:00
Refael Ackermann
66a6a5ea57
test: mark test-npm-install flaky on arm
...
PR-URL: https://github.com/nodejs/node/pull/14035
Refs: https://github.com/nodejs/node/issues/14015
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-07-19 15:02:00 -04:00
Nataly Shrits
e0e18313b6
test: replace indexOf with includes and startsWith
...
PR-URL: https://github.com/nodejs/node/pull/13852
Refs: https://github.com/nodejs/node/issues/12586
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2017-07-19 15:01:59 -04:00
Rich Trott
f1ef692454
test: refactor test-fs-options-immutable
...
* Reorder require() statements per test-writing guide
* Use common.mustNotCall() to check that callback is not invoked
* Use common.mustCall() to check that callback is invoked
PR-URL: https://github.com/nodejs/node/pull/13977
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2017-07-18 19:57:36 +02:00
Rich Trott
bb198dcda9
test: refactor test-crypto-pbkdf2
...
* re-order require() and crypto check per test writing guide
* use common.mustNotCall() to confirm callback is not invoked
PR-URL: https://github.com/nodejs/node/pull/13975
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-18 19:57:35 +02:00
Rich Trott
100ccf9ad4
test: refactor test-fs-watchfile
...
* use `common.mustNotCall()` to confirm callback is not called
* reorder modules to conform with test-writing guide
* match full error message in `assert.throws()`
PR-URL: https://github.com/nodejs/node/pull/13721
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-18 19:57:23 +02:00
cjihrig
f7383eb80e
test: verify isNativeError accepts internal errors
...
This commit verifies that Node's internal errors are recognized
by V8's IsNativeError(), which is exposed in Node as
process.binding('util').isNativeError().
PR-URL: https://github.com/nodejs/node/pull/13965
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-07-18 19:57:21 +02:00
Rich Trott
071ecb0dd2
test: refactor test-child-process-send-type-error
...
* Add exit listener to child process to check return code. Previously,
child process faiilure would not cause the test to fail.
* Use common.mustNotCall() to guarantee callback is not invoked.
* Insert blank line per test writing guide.
PR-URL: https://github.com/nodejs/node/pull/13904
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-18 19:57:18 +02:00
Rich Trott
3d0b66a7c2
benchmark,lib,test: use braces for multiline block
...
For if/else and loops where the bodies span more than one line, use
curly braces.
Original-PR-URL: https://github.com/nodejs/node/pull/13828
Ref: https://github.com/nodejs/node/pull/13623#discussion_r123048602
Original-Reviewed-By: Anna Henningsen <anna@addaleax.net >
Original-Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Original-Reviewed-By: Michaël Zasso <targos@protonmail.com >
Original-Reviewed-By: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/13995
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-07-18 19:57:15 +02:00
João Reis
e5d32b8b13
test: mark test-fs-readdir-ucs2 flaky
...
PR-URL: https://github.com/nodejs/node/pull/13989
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-18 19:57:14 +02:00
Tobias Nießen
fa9e647385
test: fix failure in test-icu-data-dir.js
...
This fixes a broken test on Windows caused by EOL conversion.
PR-URL: https://github.com/nodejs/node/pull/13987
Refs: https://github.com/nodejs/node/pull/13940
Refs: https://github.com/nodejs/node/issues/13986
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-18 19:57:13 +02:00
Timothy Gu
dff506c5c5
src: add missing new line to printed message
...
PR-URL: https://github.com/nodejs/node/pull/13940
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-07-18 19:57:13 +02:00