summaryrefslogtreecommitdiff
path: root/test/common/index.js
AgeCommit message (Collapse)Author
2018-05-05test: fix common.canCreateSymLink() on non-WindowsMasashi Hirano
test/common/README.md indicates that canCreateSymlink() always returns true on non-Windows platforms. However, prior to this commit, undefined was being returned. This commit aligns the implementation with the docs by returning true. PR-URL: https://github.com/nodejs/node/pull/20511 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-29test: verify arguments length in common.expectsErrorRuben Bridgewater
If `common.expectsError` is used as a callback, it will now also verify that there is only one argument (the expected error). PR-URL: https://github.com/nodejs/node/pull/20311 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-23test: improve common.expectsErrorRuben Bridgewater
The output is now improved by showing most properties all at once. Besides that this adds a warning to use `assert.throws` instead due to a better output. PR-URL: https://github.com/nodejs/node/pull/19797 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-04-17trace_events: adds a new trace_events apiJames M Snell
Removes the requirement to use `--trace-events-enabled` to enable trace events. Tracing is enabled automatically if there are any enabled categories. Adds a new `trace_events` module with an API for enabling/disabling trace events at runtime without a command line flag. ```js const trace_events = require('trace_events'); const categories = [ 'node.perf', 'node.async_hooks' ]; const tracing = trace_events.createTracing({ categories }); tracing.enable(); // do stuff tracing.disable(); ``` Multiple `Tracing` objects may exist and be enabled at any point in time. The enabled trace event categories is the union of all enabled `Tracing` objects and the `--trace-event-categories` flag. PR-URL: https://github.com/nodejs/node/pull/19803 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-04-06test: fix multiple expectedWarnings bugDaniel Bevenius
Commit 8fb4ea9f75 ("test: add deprecation code to expectWarning") did not take into account that the same warning could be expected multiple times. This bug was discovered in https://github.com/nodejs/node/pull/18138 and this commit adds a fix for this issue. PR-URL: https://github.com/nodejs/node/pull/19766 Refs: https://github.com/nodejs/node/pull/18138 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-05errors: make message non-enumerableRuben Bridgewater
A error message should always be non-enumerable. This makes sure that is true for dns errors as well. It also adds another check in `common.expectsError` to make sure no other regressions are introduced going forward. Fixes #19716 PR-URL: https://github.com/nodejs/node/pull/19719 Fixes: https://github.com/nodejs/node/issues/19716 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-05test: add info option to common.expectsErrorJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/19514 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-04test: check all properties in common.expectsErrorRuben Bridgewater
This makes sure all properties that are meant to be checked will actually be tested for. PR-URL: https://github.com/nodejs/node/pull/19722 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-03-26test: add deprecation code to expectWarningDaniel Bevenius
This commit adds a deprecation code to expectWarning and updates the function to check the passed code against the code property on the warning object. Not all warnings have a deprecation code so for those that don't an explicit code of common.noWarnCode is required. Passing this skips the assertion of the code. PR-URL: https://github.com/nodejs/node/pull/19474 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-03-01src: Remove lttng support.Glen Keane
This cleans up and removes lttng support completely. Recent discussion on a PR to deprecate lttng suggested that we remove it completely pending feedback from the TSC. This should be considered a non breaking change, as a recent PR reveals that compiling with this system has been broken for nearly two years. Refs: https://github.com/nodejs/node/issues/18971 Refs: https://github.com/nodejs/node/pull/18975 Refs: https://github.com/nodejs/node/pull/18945 PR-URL: https://github.com/nodejs/node/pull/18982 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-22test: introduce common.runWithInvalidFD()Joyee Cheung
This provides a more reliable way to get a fd that can be used to tirgger EBADF. PR-URL: https://github.com/nodejs/node/pull/18864 Fixes: https://github.com/nodejs/node/issues/18820 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-20lint: move eslint to new plugin systemGus Caplan
PR-URL: https://github.com/nodejs/node/pull/18566 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2018-02-20test: move getTTYfd() to common helpersJeremiah Senkpiel
This utility is fairly generic and likely useful for more than one test. PR-URL: https://github.com/nodejs/node/pull/18800 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-17tools, test: fix prof polyfill readlinekillagu
`node --prof foo.js` may not print the full profile log file, leaving the last line broken (for example `tick,`. When that happens, `readline` will be stuck in an infinite loop. This patch fixes it. Also introduced `common.isCPPSymbolsNotMapped` to avoid duplicated code on tick-processor tests. PR-URL: https://github.com/nodejs/node/pull/18641 Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-16test: add common.skipIfEslintMissingMyles Borins
We've added a number of tests that hook into ESLint which can error when running the test suite with the distributed tarball. This PR adds a new test helper `common.skipIfEslintMissing` and will skip remaining tests in a file when `ESLint` is not available at `tools/node_modules/eslint` PR-URL: https://github.com/nodejs/node/pull/18807 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-16test,benchmark,doc: enable dot-notation ruleRuben Bridgewater
This enables the eslint dot-notation rule for all code instead of only in /lib. PR-URL: https://github.com/nodejs/node/pull/18749 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-16test: update a few tests to work on OpenBSDAaron Bieber
PR-URL: https://github.com/nodejs/node/pull/18543 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-16tools: enable no-unsafe-finallyRuben Bridgewater
This enables the `no-unsafe-finally` eslint rule to make sure we have a proper control flow in try / catch. PR-URL: https://github.com/nodejs/node/pull/18745 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-31test: move tmpdir to submodule of commonRich Trott
Move tmpdir functionality to its own module (common/tmpdir). PR-URL: https://github.com/nodejs/node/pull/17856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-18http2: refactor read mechanismAnna Henningsen
Refactor the read mechanism to completely avoid copying. Instead of copying individual `DATA` frame contents into buffers, create `ArrayBuffer` instances for all socket reads and emit slices of those `ArrayBuffer`s to JS. PR-URL: https://github.com/nodejs/node/pull/18030 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-11test: fix spelling in test case commentsTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/18018 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2018-01-06test: fix common.expectsErrorRefael Ackermann
The function should strictly test for the error class and only accept the correct one. Any other error class should fail. PR-URL: https://github.com/nodejs/node/pull/13686 Fixes: https://github.com/nodejs/node/issues/13682 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-12-26test: reduce scope of variable in common moduleRich Trott
arrayBufferViews is used by only one function so scope it to that function (in the common module). PR-URL: https://github.com/nodejs/node/pull/17830 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-26timers: make setImmediate() immune to tamperingBen Noordhuis
Make setImmediate() immune to `process` global tampering by removing the dependency on the `process._immediateCallback` property. PR-URL: https://github.com/nodejs/node/pull/17736 Fixes: https://github.com/nodejs/node/issues/17681 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-21test: move firstInvalidFD() out of common moduleRich Trott
common.firstInvalidFD() is used in only one test. Move it out of the common module and into the one test that uses it. PR-URL: https://github.com/nodejs/node/pull/17781 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21test: remove getTTYfd() from common moduleRich Trott
common.getTTYfd() is used in one test only. Move it's definition to that test and out of the common module. PR-URL: https://github.com/nodejs/node/pull/17781 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-21test: remove common.projectDirRich Trott
common.projectDir is used in one test, so it's not so common. Remove from common module to the one test file that needs it. PR-URL: https://github.com/nodejs/node/pull/17781 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-13zlib: add ArrayBuffer supportJem Bezooyen
PR-URL: https://github.com/nodejs/node/pull/16042 Refs: https://github.com/nodejs/node/issues/1826 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-12test: simplify common.expectsErrorRuben Bridgewater
The mustCall is actually only necessary in case it is used as callback. Otherwise it works as a must call on its own. PR-URL: https://github.com/nodejs/node/pull/17616 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-11tools,test: throw if common.PORT used in parallel testsRich Trott
common.PORT should not be used in parallelized tests. (There can be a port collision if another tests requests an arbitrary open port from the operating system and ends up getting common.PORT before a test that uses common.PORT uses the port.) In such a situation, throw an error. PR-URL: https://github.com/nodejs/node/pull/17559 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-12-11test: simplify common.PORT codeRich Trott
common.PORT is no longer used in parallelized tests and should not be. Remove code that accommodates parallelized tests. PR-URL: https://github.com/nodejs/node/pull/17559 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-12-05test: remove hidden use of common.PORT in parallel testsRich Trott
common.hasMultiLocalhost() uses common.PORT under the hood. This is problematic in parallel tests because another test using port 0 to get an arbitrary open port may end up getting common.PORT before the test using common.PORT gets it. Therefore, change common.PORT to port 0 in common.hasMultiLocalhost(). PR-URL: https://github.com/nodejs/node/pull/17466 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-05test: forbid `common.mustCall*()` in process exit handlersRich Trott
`common.mustCall()` and `common.mustCallAtLeast()` need to be called before process exit handlers to work because checks are done inside a process exit handler. Detect if being used inside a process exit handler and throw. PR-URL: https://github.com/nodejs/node/pull/17453 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-04test: move common.fires() to inspector-helperRich Trott
common.fires() is specific to the inspector tests so move it to inspector-helper.js. The one REPL test that used common.fires() does not seem to need it. It provided a 1 second timeout for operations, but that timeout appears both arbitrary and ineffective as the test passes if it is reduced to even 1 millisecond. PR-URL: https://github.com/nodejs/node/pull/17401 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-04test: make common.mustNotCall show file:linenumberLance Ball
When a test fails via `common.mustNotCall` it is sometimes hard to determine exactly what was called. This modification stores the caller's file and line number by using the V8 Error API to capture a stack at the time `common.mustNotCall()` is called. In the event of failure, this information is printed. This change also exposes a new function in test/common, `getCallSite()` which accepts a `function` and returns a `String` with the file name and line number for the function. PR-URL: https://github.com/nodejs/node/pull/17257 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
2017-12-03test: remove fixturesDir from common moduleRich Trott
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-11-28test: remove common.tmpDirNameRich Trott
`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-28async_wrap: add provider types for net serverAndreas Madsen
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-10-30async_hooks: enable runtime checks by defaultAndreas Madsen
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-27test: use process.features.debug in common moduleRich Trott
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-26test: change tmp directories prefixRefael Ackermann
`.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-22test: increase enoughTestMem to 1.75 GbRich Trott
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-21test: fix common.PIPE path bugRich Trott
`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 c34ae48083b44f1da7be75c8d11abc9f3aa7ab19. 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-19async_hooks: skip runtime checks when disabledAndreas Madsen
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-18test: add common.projectDirJoyee Cheung
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-15test: use relative path in pipePrefixRandal Hanford
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-09-27test: print resource stack on errorTrevor Norris
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-26async_hooks: consistent internal namingAndreas Madsen
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-13test: allow adding known-globals through ENVRefael Ackermann
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-08-30tools: add eslint rule for hasCrypto checkingDaniel Bevenius
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>