0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

64 Commits

Author SHA1 Message Date
Rich Trott
f299922068 test: remove fixturesDir from common module
Remove common.fixturesDir. All tests now use the the common/fixtures
module instead.

PR-URL: https://github.com/nodejs/node/pull/17400
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-03 20:12:45 -08:00
Rich Trott
dd629efcd5 test,doc: do not indicate that non-functions "return" values
Update documentation for test `common` module so that properties that
are not functions do not specify a return type and functions that do
return values specify the type.

PR-URL: https://github.com/nodejs/node/pull/17267
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-01 14:50:49 -08:00
Mithun Sasidharan
f6926d5d00
test: refactored test-http-allow-req-after-204-res to countdown
PR-URL: https://github.com/nodejs/node/pull/17211
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-12-01 20:59:06 +01:00
Rich Trott
929f343bb3 doc,test: remove unnecessary await with return instances
Remove unnecessary `await` in combination with `return` in preparation
for enabling lint rule.

PR-URL: https://github.com/nodejs/node/pull/17265
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-11-30 23:24:44 -08:00
Rich Trott
ecbae568b7 test: remove common.tmpDirName
`common.tmpDirName` is used in only one test and can be replaced with
`path.basename(common.tmpDir)`.

PR-URL: https://github.com/nodejs/node/pull/17266
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-11-28 16:17:53 -05:00
Joyee Cheung
59ed40a8a6
test: add common.dns.errorLookupMock
PR-URL: https://github.com/nodejs/node/pull/17296
Refs: https://github.com/nodejs/help/issues/687
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-28 23:06:49 +08:00
WhoMeNope
8075d82ecf
test: add es6 module global leakage tests
* created testing es6 module for global leakage tests
* fixed a couple basic errors (vars -> lets, ...)
* added globals leakage detection to es module tests
* reversed whitespace change
* whitespace change reversed

PR-URL: https://github.com/nodejs/node/pull/16341
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>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-11-28 03:01:52 +01:00
Andreas Madsen
b44efded84
async_wrap: add provider types for net server
Adds `TCPSERVERWRAP` and `PIPESERVERWRAP` as provider types. This
makes it possible to distinguish servers from connections.

PR-URL: https://github.com/nodejs/node/pull/17157
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-11-28 02:50:54 +01:00
Joyee Cheung
5b4762f1a4 test: introduce test/common/internet.addresses
This commit introduces test/common/internet.address, which
includes a set of addresses for doing internet tests.
These addresses can be overriden using NODE_TEST_* environment
variables.

PR-URL: https://github.com/nodejs/node/pull/16390
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-08 18:54:08 +08:00
Andreas Madsen
23a3911cb1
async_hooks: enable runtime checks by default
Ref: https://github.com/nodejs/node/pull/15454
PR-URL: https://github.com/nodejs/node/pull/16318
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-30 11:27:42 +01:00
Rich Trott
98eab4a461 test: use process.features.debug in common module
Replace process.config.target_defaults.default_configuration check with
process.features.debug.

PR-URL: https://github.com/nodejs/node/pull/16537
Ref: https://github.com/nodejs/node/pull/4431#issuecomment-173663527
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-27 10:04:23 -07:00
Refael Ackermann
2be9198097
test: change tmp directories prefix
`.tmp` prefix allows easier exclusion

PR-URL: https://github.com/nodejs/node/pull/16372
Refs: https://github.com/nodejs/node/pull/16010
Refs: https://github.com/nodejs/node/issues/16278
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@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-10-26 18:38:34 -04:00
Anna Henningsen
e340a66cb1
test: add makeDuplexPair() helper
Add a utility for adding simple, streams-API based duplex pairs.

PR-URL: https://github.com/nodejs/node/pull/16269
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-23 16:50:43 +02:00
Rich Trott
53f4ac2774 test: increase enoughTestMem to 1.75 Gb
PR-URL: https://github.com/nodejs/node/pull/16374
Fixes: https://github.com/nodejs/node/issues/16354
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@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-10-22 10:07:13 -07:00
Rich Trott
8e268c70dd test: fix common.PIPE path bug
`common.PIPE` is returning a path name in `test` rather than in the
`tmp` directory for each test. This is causing multiple test failures in
CI. Make the path name inside the temporary directories again. This way
the pipe is removed by `common.refreshTmpDir()` on POSIX.

The bug in `common.PIPE` was introduced in
c34ae48083.

PR-URL: https://github.com/nodejs/node/pull/16364
Fixes: https://github.com/nodejs/node/issues/16290
Fixes: https://github.com/nodejs/node/issues/16323
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-10-21 12:04:59 -07:00
Andreas Madsen
7c079d1261
async_hooks: skip runtime checks when disabled
PR-URL: https://github.com/nodejs/node/pull/15454
Ref: https://github.com/nodejs/node/pull/14387
Ref: https://github.com/nodejs/node/pull/14722
Ref: https://github.com/nodejs/node/issues/14717
Ref: https://github.com/nodejs/node/issues/15448
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-10-19 12:45:21 +02:00
Joyee Cheung
a5262f1a3b test: add common.projectDir
Implement common.projectDir which points to the project directory.

PR-URL: https://github.com/nodejs/node/pull/16208
Fixes: https://github.com/nodejs/build/issues/887
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-10-18 20:23:51 +08:00
Jon Moss
978629ca12
test: move inspector tests to parallel/sequential
* remove inspector directory artifacts

PR-URL: https://github.com/nodejs/node/pull/16197
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-17 19:35:50 -04:00
Randal Hanford
971aad1b13 test: use relative path in pipePrefix
Modified pipePrefix to use relative path on windows,
previously tests failed when the full path was 120+ characters

PR-URL: https://github.com/nodejs/node/pull/15988
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-15 00:47:06 +08:00
Rich Trott
edebc902cf doc: add parentheses to refreshTmpDir()
`common.refreshTmpDir()` is a function. Add parentheses to make that
explicit. Also copy edit the descriptive sentence.

PR-URL: https://github.com/nodejs/node/pull/16168
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-12 17:37:14 -07:00
Cameron Burwell
b9f90fd0b4 doc: document the test/common/dns module
Added requested documentation for the dns.js module. Also fixed a typo.

PR-URL: https://github.com/nodejs/node/pull/15772
Fixes: https://github.com/nodejs/node/issues/15596
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-10 17:28:10 -07:00
Rich Trott
463484b330 doc: explain common.restore* functions
Explain that `common.restoreStderr()` and `common.restoreStdout()` are
for use with `common.hijackStderr()` and `common.hijackStdout()`
respectively.

PR-URL: https://github.com/nodejs/node/pull/15720
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-10-04 23:46:22 -07:00
Trevor Norris
44dc449eff
test: print resource stack on error
When running tests with NODE_TEST_WITH_ASYNC_HOOKS and the same asyncId
is detected twice print the stack traces of both init() calls. Also
print if the resource is the same instance.

PR-URL: https://github.com/nodejs/node/pull/14208
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-27 04:15:39 -06:00
Rich Trott
1f21a5cdb7 doc: update table of contents for common/README.md
The `countdown` and `fixtures` modules are documented in the
`common/README.md` file but are omitted from the table of contents. Add
them.

PR-URL: https://github.com/nodejs/node/pull/15595
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-26 20:25:13 -07:00
Andreas Madsen
3a69ef55e0
async_hooks: consistent internal naming
PR-URL: https://github.com/nodejs/node/pull/15569
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-26 15:50:10 +02:00
Refael Ackermann
b8d532c4bd
test: allow adding known-globals through ENV
PR-URL: https://github.com/nodejs/node/pull/15187
Refs: https://youtrack.jetbrains.com/issue/WEB-27528
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-13 17:07:00 -04:00
Jon Moss
640b20616d
test: create shared runBenchmark function
Mostly shared/duplicated logic between all benchmark test files, so
creating a new common module to store it.

PR-URL: https://github.com/nodejs/node/pull/15004
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-11 11:26:15 -04:00
Daniel Bevenius
50ebac1124
tools: add eslint rule for hasCrypto checking
The motivation for this commit is to pick up early on missing checks for
crypto support (when Node is built --without-ssl).

There are currently usages of common.hasCrypto which are not just for
detecting if crypto support is available and then skip the test in
question. For these case we still want to have a lint error generated
which can then be disabled using an ESLint comment.

PR-URL: https://github.com/nodejs/node/pull/13813
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2017-08-30 18:02:58 -03:00
XadillaX
1ffd01cf7f test: fix hijackStdout behavior in console
`console.log` and some other function will swallow the exception in
`stdout.write`. So an asynchronous exception is needed, or
`common.hijackStdout` won't detect some exception.

Refs: https://github.com/nodejs/node/blob/v8.2.1/lib/console.js#L87

PR-URL: https://github.com/nodejs/node/pull/14647
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-08-29 10:48:53 -07:00
Bartosz Sosnowski
ca9b3f27eb test, win: fix IPv6 detection on Windows
Add proper IPv6 detection on loopback device on Windows.

PR-URL: https://github.com/nodejs/node/pull/14865
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-24 15:56:04 +02:00
Miroslav Bajtoš
a0895ed6c4
inspector: enable async stack traces
Implement a special async_hooks listener that forwards information
about async tasks to V8Inspector asyncTask* API, thus enabling
DevTools feature "async stack traces".

The feature is enabled only on 64bit platforms due to a technical
limitation of V8 Inspector: inspector uses a pointer as a task id,
while async_hooks use 64bit numbers as ids.

To avoid performance penalty of async_hooks when not debugging,
the new listener is enabled only when the process enters a debug mode:

 - When the process is started with `--inspect` or `--inspect-brk`,
   the listener is enabled immediately and async stack traces
   lead all the way to the first tick of the event loop.

 - When the debug mode is enabled via SIGUSR1 or `_debugProcess()`,
   the listener is enabled together with the debugger. As a result,
   only async operations started after the signal was received
   will be correctly observed and reported to V8 Inspector. For example,
   a `setInterval()` called in the first tick of the event will not be
   shown in the async stack trace when the callback is invoked. This
   behaviour is consistent with Chrome DevTools.

Last but not least, this commit fixes handling of InspectorAgent's
internal property `enabled_` to ensure it's set back to `false`
after the debugger is deactivated (typically via `process._debugEnd()`).

Fixes: https://github.com/nodejs/node/issues/11370
PR-URL: https://github.com/nodejs/node/pull/13870
Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Reviewed-by: Anna Henningsen <anna@addaleax.net>
2017-08-17 20:52:39 +08:00
Eugene Ostroukhov
5f31d54720 inspector: rewrite inspector test helper
Helper was rewritten to rely on promises instead of manually written
queue and callbacks. This simplifies the code and makes it easier to
maintain and extend.

PR-URL: https://github.com/nodejs/node/pull/14797
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-14 17:37:23 -07:00
Anna Henningsen
a6973a3811
Revert "inspector: rewrite inspector test helper"
This reverts commit 2296b677fb.

That commit was landed without a green CI and is failing on Windows.

Ref: https://github.com/nodejs/node/pull/14460
PR-URL: https://github.com/nodejs/node/pull/14777
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-11 22:33:29 +02:00
Eugene Ostroukhov
2296b677fb inspector: rewrite inspector test helper
Helper was rewritten to rely on promises instead of manually written
queue and callbacks. This simplifies the code and makes it easier to
maintain and extend.

PR-URL: https://github.com/nodejs/node/pull/14460
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-10 16:19:11 -07:00
Jared Kantrowitz
80ebb4282d
src: adjust windows abort behavior
Raising SIGABRT is handled in the CRT in windows, calling _exit()
with ambiguous code "3" by default.

This adjustment to the abort behavior gives a more sane exit code
on abort, by calling _exit directly with code 134.

PR-URL: https://github.com/nodejs/node/pull/13947
Fixes: https://github.com/nodejs/node/issues/12271
Refs: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/abort
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-08-07 22:46:01 -04:00
James M Snell
7535a94c8a test: begin normalizing fixtures use
Adds a new `../common/fixtures' module to begin normalizing
`test/fixtures` use. Our test code is a bit inconsistent with
regards to use of the fixtures directory. Some code uses
`path.join()`, some code uses string concats, some other
code uses template strings, etc. In mnay cases, significant
duplication of code is seen when accessing fixture files, etc.

This updates many (but by no means all) of the tests in the
test suite to use the new consistent API. There are still
many more to update, which would make an excelent Code-n-Learn
exercise.

PR-URL: https://github.com/nodejs/node/pull/14332
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-08-07 18:00:57 -07:00
James M Snell
b1e055696f http2: add tests and benchmarks
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-04 12:55:58 -07:00
Rich Trott
aa6fac68da test: adjust indentation for stricter linting
ESLint 4.x has stricter linting than previous versions. We are currently
using the legacy indentation rules in the test directory. This commit
changes the indentation of files to comply with the stricter 4.x linting
and enable stricter linting in the test directory.

PR-URL: https://github.com/nodejs/node/pull/14431
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2017-07-27 09:24:20 -07:00
James M Snell
b0a8a7c6ba test: improvements to various http tests
* Add common/countdown utility
* Numerous improvements to http tests

PR-URL: https://github.com/nodejs/node/pull/14315
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-07-24 14:16:49 -07:00
Anna Henningsen
69f653dff9
test: add non-internet resolveAny tests
This is a bit of a check to see how people feel about having this kind
of test.

Ref: https://github.com/nodejs/node/pull/13137
PR-URL: https://github.com/nodejs/node/pull/13883
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-23 16:20:58 +02:00
Sebastiaan Deckers
bb29405904
lib,src: fix consistent spacing inside braces
PR-URL: https://github.com/nodejs/node/pull/14162
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-21 15:13:47 -04:00
Vse Mozhet Byt
4f87522244 doc, lib, test: do not re-require needlessly
PR-URL: https://github.com/nodejs/node/pull/14244
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-07-21 20:40:52 +03:00
Ruben Bridgewater
2a621d4051
test: validate more properties in expectsError
PR-URL: https://github.com/nodejs/node/pull/14058
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-07-19 15:18:02 -04:00
章礼平
fb37922cf3 test: change isAix to isAIX
This makes the naming more consistent with existing properties like
isFreeBSD where the capitalization of the property name is consistent
with the conventional styling of the operating system.

PR-URL: https://github.com/nodejs/node/pull/14263
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
2017-07-16 02:24:47 -07:00
Refael Ackermann
c34ae48083
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-14 19:36:10 -04:00
Ruben Bridgewater
5ffb5b6fce
test: improve the test common documentation
PR-URL: https://github.com/nodejs/node/pull/14148
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@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: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-07-13 10:27:23 +08:00
starkwang
dbfe8c4ea2
errors,buffer: port errors to internal/errors
PR-URL: https://github.com/nodejs/node/pull/13976
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-07-12 17:00:30 -04:00
Ruben Bridgewater
1b2733f272
test: common.expectsError should be a must call
Wrap expectsError in mustCall to make sure it's really called
as expected.

PR-URL: https://github.com/nodejs/node/pull/14088
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-07-09 14:19:13 -04:00
Ruben Bridgewater
d6fece1436
test: add optional throw fn to expectsError
PR-URL: https://github.com/nodejs/node/pull/14089
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-08 16:00:57 -04: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