summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-12-05src,lib: make process.binding('config') internalMasashi Hirano
PR-URL: https://github.com/nodejs/node/pull/23400 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-12-04test: remove unused addons-napi directoryRich Trott
Refs: https://github.com/nodejs/node/pull/24557#issuecomment-444284512 PR-URL: https://github.com/nodejs/node/pull/24839 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-12-04test: add .gitignore file for node-apiRich Trott
Refs: https://github.com/nodejs/node/pull/24557#issuecomment-444284114 PR-URL: https://github.com/nodejs/node/pull/24839 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-12-04test: partition N-API testsGabriel Schulhof
Partition test/addons-napi into test/js-native-api and test/node-api to isolate the Node.js-agnostic portion of the N-API tests from the Node.js-specific portion. PR-URL: https://github.com/nodejs/node/pull/24557 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-12-04process: provide dummy stdio for non-console Windows appsAnna Henningsen
The only known condition where we could not provide appropriate stdio streams so far were non-console Windows applications. Since this issue has come up a few times in our issue tracker now, switch to providing dummy streams for these cases instead. If there are other valid cases in which `uv_guess_handle` fails, and where there is a more sensible way to provide stdio, we’ll probably still find out because the streams don’t work properly either way. Refs: https://github.com/nodejs/help/issues/1251 PR-URL: https://github.com/nodejs/node/pull/20640 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-04test: fix `common.mustNotCall()` usage in HTTP testAnna Henningsen
The argument to `common.mustNotCall()` is a message, not a function. PR-URL: https://github.com/nodejs/node/pull/24750 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-12-04test: use ES2017 syntax in test-fs-open-*jy95
Update test-fs-open-flags to take advantage of destructuring and default values. Update test-fs-open-mode-mask to use a ternary to make use of a constant possible. PR-URL: https://github.com/nodejs/node/pull/23031 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-04test: check for the correct strict equal arguments orderRuben Bridgewater
This activates a eslint rule to verify that the `assert.strictEqual()` arguments are in the correct order. PR-URL: https://github.com/nodejs/node/pull/24752 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-12-03test: add flag scenario in test-fs-write-file-syncGireesh Punathil
fs.writeFileSync takes flag param to define the file opening semantics. Add a scenario that covers flags as well. PR-URL: https://github.com/nodejs/node/pull/24766 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-12-03http: destroy the socket on parse errorLuigi Pinca
Destroy the socket if the `'clientError'` event is emitted and there is no listener for it. Fixes: https://github.com/nodejs/node/issues/24586 PR-URL: https://github.com/nodejs/node/pull/24757 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-04src: use NativeModuleLoader to compile all the bootstrappersJoyee Cheung
This patch moves all the bootstrapper compilation to use NativeModuleLoader::CompileAndCall(). With this we no longer need to mess with the error decoration and handling any more - there is no point in handling the JS error occurred during bootstrapping by ourselves, we should just crash or let the VM handle it. PR-URL: https://github.com/nodejs/node/pull/24775 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-03test: improve comparison coverage to 100%Ruben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/24749 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-12-03assert,util: fix sparse array comparisonRuben Bridgewater
Comparing sparse arrays did not work properly. That is fixed and tests were added to verify that everything works as expected. This had an impact on `util.isDeepStrictEqual()` and `assert.deepStrictEqual()` and their counterpart `assert.notDeepStrictEqual()`. PR-URL: https://github.com/nodejs/node/pull/24749 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-12-03assert: fix loose deepEqual map comparisonRuben Bridgewater
Loose map comparison had an logic error. It will now be properly compared. PR-URL: https://github.com/nodejs/node/pull/24749 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-12-03util: improve internal `isError()` validationRuben Bridgewater
The current internal isError function checked the toString value instead of using the more precise `util.types.isNativeError()` check. The `instanceof` check is not removed due to possible errors that are not native but still an instance of Error. PR-URL: https://github.com/nodejs/node/pull/24746 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-12-03util,console: handle symbols as defined in the specRuben Bridgewater
The `console` functions rely on the `util.format()` behavior. It did not follow the whatwg spec when it comes to symbols in combination with the %d, %i and %f format specifiers. Using a symbol argument in combination with one of these specifiers resulted in an error instead of returning `'NaN'`. This is now fixed by this patch. PR-URL: https://github.com/nodejs/node/pull/23708 Refs: https://console.spec.whatwg.org/#formatter Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-12-03test: check invalid argument error for optiontimothy searcy
This commit adds a test for the validateArguments function in TextDecoder. PR-URL: https://github.com/nodejs/node/pull/24736 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-12-03test: increase assert test coverageRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/24745 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-12-03tls: add code for ERR_TLS_INVALID_PROTOCOL_METHODSam Roberts
Add an error code property to invalid `secureProtocol` method exceptions. PR-URL: https://github.com/nodejs/node/pull/24729 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-02http2: make compat writeHead not crash if the stream is destroyedMatteo Collina
Fixes: https://github.com/nodejs/node/issues/24470 PR-URL: https://github.com/nodejs/node/pull/24723 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-02http: fix error return in `Finish()`Fedor Indutny
`http_parser_execute(..., nullptr, 0)` returns either `0` or `1`. The expectation is that no error must be returned if it is `0`, and if it is `1` - a `Error` object must be returned back to user. The introduction of `llhttp` and the refactor that happened during it accidentally removed the error-returning code. This commit reverts it back to its original state. Fix: #24585 PR-URL: https://github.com/nodejs/node/pull/24738 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-01test: show stdout and stderr in test-cli-syntax when it failsJoyee Cheung
To help debugging the flake with the log from the CI. PR-URL: https://github.com/nodejs/node/pull/24720 Refs: https://github.com/nodejs/node/issues/24403 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-02console: split console into global.js and constructor.jsJoyee Cheung
Since we do not actually use the Console constructor to instantiate the global console, move the two piece of code into two different JS files for clarity, and make console.js a mere re-export of the global console. The hope is to make the global console, a namespace, more web-compatible while keeping the Console constructor available for backwards compatibility. PR-URL: https://github.com/nodejs/node/pull/24709 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-01test: minor refactoring of onticketkeycallbackDaniel Bevenius
The motivation for this commit is to make the the onticketkeycallback function more readable. PR-URL: https://github.com/nodejs/node/pull/24718 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-01url: reuse existing context in href setterTimothy Gu
Correctness-wise, this removes side effects in the href setter if parsing fails. Style-wise, this allows removing the parse() wrapper function around C++ _parse(). Also fix an existing bug with whitespace trimming in C++ that was previously circumvented by additionally trimming the input in JavaScript. Fixes: https://github.com/nodejs/node/issues/24345 Refs: https://github.com/nodejs/node/pull/24218#issuecomment-438476591 PR-URL: https://github.com/nodejs/node/pull/24495 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-01src: set HAS_USERNAME/PASSWORD more strictlyTimothy Gu
Fixes: https://github.com/nodejs/node/issues/24211 PR-URL: https://github.com/nodejs/node/pull/24495 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-01Revert "url: make the context non-enumerable"Timothy Gu
This reverts commit 5e1bf058f4906c0a49c34c6a1353d0b34784c80a, as it causes major performance regressions during object construction. Refs: https://github.com/nodejs/node/pull/24218 PR-URL: https://github.com/nodejs/node/pull/24495 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-01timers: fix setTimeout expiration logicSuguru Motegi
Fix the timer logic to be the same as v10.30.0. Fixes: https://github.com/nodejs/node/issues/24203 PR-URL: https://github.com/nodejs/node/pull/24214 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-12-01test: mark test_threadsafe_function/test as flakyGireesh Punathil
The test fails consistently on windows-fanned with vs2017. mark it as flaky while the issue is being progressed, and to keep CI green / amber. Ref: https://github.com/nodejs/node/issues/23621 PR-URL: https://github.com/nodejs/node/pull/24714 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-11-30test: verify order of error in h2 server streamMyles Borins
Currently the order of error / closing of an h2 stream is consistent in 10.x, 11.x, and master. There appears to be an unexpected behavior difference in 8.x. This test will be used to bisect the commit that will fix this behavior change and ensure there are no future regressions. PR-URL: https://github.com/nodejs/node/pull/24685 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-30test: cover path empty string caselakatostamas
In path.toNamespacePath was a case when the path was empty string and it wasn't covered in the tests. I covered this case both in Windows and Unix environments. PR-URL: https://github.com/nodejs/node/pull/24569 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-30test: use arrow syntax for anonymous callbacksShubham Urkade
PR-URL: https://github.com/nodejs/node/pull/24691 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-29process: refactor the bootstrap mode branching for readabilityJoyee Cheung
This patch refactors the branches for choosing the mode to run Node.js in `internal/bootstrap/node.js`. Instead of inlining the decision making all in `startup`, we create a `startExecution()` function which either detects and start the non-user-code mode, or prepares for user code execution (worker setup, preloading modules) and starts user code execution. We use early returns when we decide the mode to run Node.js in for fewer indentations and better readability. This patch also adds a few comments about the command-line switches and a few TODOs to remove underscore properties on `process` that are mainly used for bootstrap mode branching. It also includes a few other refactoring such as inlining functions/variables that are not reused and removing the default argument of `evalScript` for better clarity. PR-URL: https://github.com/nodejs/node/pull/24673 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-29http2: add compat support for nested array headersSebastiaan Deckers
writeHead supports an array of arrays containing header name and values. Compatibility between http2 & http1 even though this is not documented. Fixes: https://github.com/nodejs/node/issues/24466 PR-URL: https://github.com/nodejs/node/pull/24665 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-29test: fix the arguments order in assert.strictEqualpastak
PR-URL: https://github.com/nodejs/node/pull/24620 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2018-11-29win, fs: detect if symlink target is a directoryBartosz Sosnowski
On Windows creating a symlink to a directory will not work unless extra 'dir' parameter is passed. This adds a check if link target is a directory, and if so automatically use 'dir' when creating symlink. PR-URL: https://github.com/nodejs/node/pull/23724 Refs: https://github.com/nodejs/node/pull/23691 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-11-29process: fix omitting `--` from `process.execArgv`Anna Henningsen
This was essentially a typo that went unnoticed because we didn’t have tests for this particular situation. Fixes: https://github.com/nodejs/node/issues/24647 PR-URL: https://github.com/nodejs/node/pull/24654 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-29stream: make async iterator .next() always resolveMatteo Collina
See: https://github.com/nodejs/readable-stream/issues/387 PR-URL: https://github.com/nodejs/node/pull/24668 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-29test: mark test-vm-timeout-escape-nexttick flakyGireesh Punathil
This is a known failure so mark it such, so that CI is green / amber while the issue is being progressed. PR-URL: https://github.com/nodejs/node/pull/24712 Refs: https://github.com/nodejs/node/pull/24620 Refs: https://github.com/nodejs/node/issues/24120 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-11-28test: fix the arguments order in assert.strictEqualsigwyg
I working at "Code and Learn" on Node fest 2018 in Japan. Refs: https://github.com/nodejs/node/pull/24431 PR-URL: https://github.com/nodejs/node/pull/24624 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2018-11-28test: fix the arguments order in `assert.strictEqual`rt33
PR-URL: https://github.com/nodejs/node/pull/24626 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-28test: reach res._dump after abort ClientRequestTadhg Creedon
PR-URL: https://github.com/nodejs/node/pull/24191 Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-11-28test: validate fs.rename() when NODE_TEST_DIR on separate mountDrew Folta
When testing fs.rename() of an non-existent file, use a destination path which is in the same directory. Otherwise we might trigger an `EXDEV` error if NODE_TEST_DIR is a separate device than the current working directory. Fixes: https://github.com/nodejs/node/issues/21669 PR-URL: https://github.com/nodejs/node/pull/24707 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-28test: test and docs for detached fork processtimothy searcy
This tests child process fork component in detached mode by spawning a parent process that creates a child process. We kill the parent process and check if the child is still running. Fixes: https://github.com/nodejs/node/issues/17592 PR-URL: https://github.com/nodejs/node/pull/24524 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-29console: lazy load process.stderr and process.stdoutJoyee Cheung
This patch: - Refactors the Console constructor: moves the property binding code into and the writable streams binding code into two methods defined on the Console.prototype with symbols. - Refactors the global console creation: we only need to share the property binding code from the Console constructor. To bind the streams we can lazy load `process.stdio` and `process.stderr` so that we don't create these streams when they are not used. This significantly reduces the number of modules loaded during bootstrap. Also, by calling the refactored-out method directly we can skip the unnecessary typechecks when creating the global console and there is no need to create a temporary Console anymore. - Refactors the error handler creation and the `write` method: use a `kUseStdout` symbol to tell the internals which stream should be loaded from the console instance. Also put the `write` method on the Console prototype so it just loads other properties directly off the console instance which simplifies the call sites. Also leaves a few TODOs for further refactoring of the console bootstrap. PR-URL: https://github.com/nodejs/node/pull/24534 Reviewed-By: Gus Caplan <me@gus.host>
2018-11-28test: fix arguments order in `assert.strictEqual`sota1235
PR-URL: https://github.com/nodejs/node/pull/24607 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2018-11-28test: fix arguments order in assert.strictEqualgrimrose
PR-URL: https://github.com/nodejs/node/pull/24608 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2018-11-28test: make test-uv-binding-constant JS engine neutralRich Trott
The error message validation in test-uv-binding-constant depends on the JS engine. The text will be different in node-chakracore than in V8-based versions of Node.js. Remove the message validation. Test that it is a TypeError only. We should only validate error messages when we control the contents of that error message (and not even necessarily then, but that is a minimum requirement). V8 and other underlying engines can change the error message at any time and that should not require us to change our tests (as changing tests suggests a semver-major change). PR-URL: https://github.com/nodejs/node/pull/24666 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-28test: use arrow functionsagirk
In `test/parallel/test-child-process-env.js`, callbacks use anonymous closure functions. It is safe to replace them with arrow functions since these callbacks don't contain references to `this`, `super` or `arguments`. This results in shorter functions. PR-URL: https://github.com/nodejs/node/pull/24482 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-11-28test: fix arguments order in `assert.strictEqual`Takahiro Nakamura
PR-URL: https://github.com/nodejs/node/pull/24621 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>