Commit Graph

91 Commits (b35181f877d5a92e8bb52eb071489f2a7d87494b)

Author SHA1 Message Date
Rich Trott b6e301a9e0 test: add test-fs-writeFileSync-invalid-windows
Add a known_issues test for the Windows returning ENOTFOUND where EINVAL
is more appropriate. This happens with various functions in the `fs`
module when an invalid path is used.

Refs: https://github.com/nodejs/node/issues/8987

PR-URL: https://github.com/nodejs/node/pull/28569
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-11 10:27:42 -07:00
Rich Trott e008ca8b93 test: fix flaky test-vm-timeout-escape-nexttick
PR-URL: https://github.com/nodejs/node/pull/28461
Fixes: https://github.com/nodejs/node/issues/24120
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-02 06:49:40 +02:00
Sam Roberts b17a70f639 test: add github refs to flaky tests
PR-URL: https://github.com/nodejs/node/pull/28123
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-10 11:05:03 -07:00
cjihrig a3d1922958
test: unskip copyfile permission test
This is no longer a flakey test, and should run everywhere.

PR-URL: https://github.com/nodejs/node/pull/27241
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-04-22 12:04:35 -04:00
cjihrig b368571fba
test: move known issue test to parallel
As of libuv 1.28.0, this bug is fixed, and the test can be
moved to parallel. This commit also updates an error code
check to work on Windows.

PR-URL: https://github.com/nodejs/node/pull/27241
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-04-22 12:04:35 -04:00
cjihrig e573394937 test: fix error code typo
PR-URL: https://github.com/nodejs/node/pull/27024
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-01 06:22:25 +02:00
Rich Trott 30e884f4f4 test: add known_issues test for fs.copyFile()
On macOS, fs.copyFile() may not respect file permissions. There is a PR
for libuv that should fix this, but until it lands and we can either
float a patch or upgrade libuv, have a known_issues test.

Ref: https://github.com/nodejs/node/issues/26936
Ref: https://github.com/libuv/libuv/pull/2233

PR-URL: https://github.com/nodejs/node/pull/26939
Refs: https://github.com/nodejs/node/issues/26936
Refs: https://github.com/libuv/libuv/pull/2233
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2019-03-29 19:17:16 -07:00
Ruben Bridgewater f9da55cca2
test: remove test-path-parse-6229.js from known issues
This test precedented the official documentation that states that
this is an expected behavior.

PR-URL: https://github.com/nodejs/node/pull/26913
Refs: https://github.com/nodejs/node/issues/6229
Refs: https://github.com/nodejs/node/pull/12181
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-03-29 11:02:15 +01:00
Ruben Bridgewater b08a867d60
benchmark,doc,lib: capitalize more comments
PR-URL: https://github.com/nodejs/node/pull/26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-27 17:20:06 +01:00
Ruben Bridgewater f8763bb077
benchmark,doc,lib,test: capitalize comments
PR-URL: https://github.com/nodejs/node/pull/26483
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-03-10 00:44:40 +01:00
Ruben Bridgewater 9edce1e12a
benchmark,doc,lib,test: capitalize comments
This updates a lot of comments.

PR-URL: https://github.com/nodejs/node/pull/26223
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-02-28 18:31:10 +01:00
Joyee Cheung c2359bdad6
process: expose process.features.inspector
Instead of using process.config.variables.v8_enable_inspector
to detect whether inspector is enabled in the build.

PR-URL: https://github.com/nodejs/node/pull/25819
Refs: https://github.com/nodejs/node/issues/25343
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-02 05:41:45 +08:00
Rich Trott 35f45ba47b test: remove known_issues/test-cluster-bind-privileged-port
The test was added to check for a bug in macOS Mojave, but it turns out
the issue is a macOS feature, not a bug.

Refs: https://github.com/nodejs/node/issues/21679#issuecomment-456589386
Fixes: https://github.com/nodejs/node/issues/21679

PR-URL: https://github.com/nodejs/node/pull/25649
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2019-01-24 14:42:51 -08:00
Rich Trott 27f6d04dcf test: improve known_issues/test-vm-timeout-escape-queuemicrotask
Improve known_issues/test-vm-timeout-escape-queuemicrotask to mitigate
CI failures on ubuntu1604-arm64. Failures are due to a race condition.
Use `common.platformTimeout()` to help, adjust timeout to make sure
`queueMicrotasks()` has a chance to run, and improve error message.

PR-URL: https://github.com/nodejs/node/pull/25503
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Coe <bencoe@gmail.com>
2019-01-15 05:59:43 -08:00
Ruben Bridgewater 1f85ea979c
tools: capitalize sentences
This adds the `capitalized-comments` eslint rule to verify that
actual sentences use capital letters as starting letters. It ignores
special words and all lines below 62 characters.

PR-URL: https://github.com/nodejs/node/pull/24808
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-12-10 17:07:18 +01:00
Gireesh Punathil 9e33e86180 test: mark test-vm-timeout-escape-nexttick flaky
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-29 05:48:51 -08:00
Sarath Govind K K c5b326a0fa test: replcae anonymous closure with arrow function
PR-URL: https://github.com/nodejs/node/pull/24476
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-22 05:46:06 +01:00
Rich Trott 8e3c5b59bf test: fix flaky test-vm-timeout-escape-queuemicrotask
Use a larger timeout on slower platforms so that the timeout doesn't
fire before the error condition occurs.

PR-URL: https://github.com/nodejs/node/pull/24296
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-12 21:02:35 -08:00
Rich Trott a4a2e9f737 test: fix flaky test-vm-timeout-escape-nexttick
Increase the VM timeout. If it is too small, the VM does not exit before
the code has a chance to create the problematic condition that causes
the timeout to be ignored.

Fixes: https://github.com/nodejs/node/issues/24120

PR-URL: https://github.com/nodejs/node/pull/24251
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-11-09 04:50:14 -08:00
Joyee Cheung 1357913180
test: use URL fixtures under test/fixtures/wpt/url/resources
Removes the following files:

- test/fixtures/url-tests.js
- test/fixtures/url-setter-tests.js
- test/fixtures/url-toascii.js

in favor of:

- test/fixtures/wpt/url/resources/urltestdata.json
- test/fixtures/wpt/url/resources/setters_tests.json
- test/fixtures/wpt/url/resources/toascii.json

Also removes dependency of `fixtures/url-tests.js` in http2 tests
and use `fixtures/person-large.jpg` instead since they are just
looking for a big enough file to transfer.

PR-URL: https://github.com/nodejs/node/pull/24035
Refs: https://github.com/nodejs/node/issues/23192
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-11-09 20:27:20 +08:00
Rich Trott d8e06b23b0 test: fix flaky VM timeout test on Raspberry Pi
Increase the timeouts based on platform. This required adjusting
common.platformTimeout() to deal with bigint.

Fixes: https://github.com/nodejs/node/issues/24120

PR-URL: https://github.com/nodejs/node/pull/24238
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-11-07 19:26:32 -08:00
cjihrig a74b4a062f
test: remove unused catch bindings
PR-URL: https://github.com/nodejs/node/pull/24079
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-11-06 10:59:18 -05:00
Geoffrey Booth 22f7d0a4bd module: support multi-dot file extension
Support multi-dot file extensions like '.coffee.md' in Module.load.

PR-URL: https://github.com/nodejs/node/pull/23416
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
2018-11-01 19:28:15 -07:00
James M Snell 095a6027b3
test: mark test-vm-timeout-* known issue tests flaky
These are known issues that can be flaky on certain platforms
because they rely entirely on timing differences.

PR-URL: https://github.com/nodejs/node/pull/23743
Refs: https://github.com/nodejs/node/issues/3020
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-10-24 13:52:19 -07:00
James M Snell 5e5a9455f8
doc, test: document and test vm timeout escapes
Using `process.nextTick()`, `Promise`, or `queueMicrotask()`, it
is possible to escape the `timeout` set when running code with
`vm.runInContext()`, `vm.runInThisContext()`, and
`vm.runInNewContext()`.

This documents the issue and adds three known_issues tests.

Refs: https://github.com/nodejs/node/issues/3020
PR-URL: https://github.com/nodejs/node/pull/23743
Refs: https://github.com/nodejs/node/issues/3020
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-10-24 13:51:59 -07:00
jn99 eff869fecc
test: skip failing tests for osx mojave
Refs: https://github.com/nodejs/node/issues/21679
PR-URL: https://github.com/nodejs/node/pull/23550
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-10-21 06:01:49 +02:00
Illescas, Ricardo 35ed66c776 test: fix argument order in assertion
Change the order of assert parameters so the first argument is the value
and the second one the expected value.

PR-URL: https://github.com/nodejs/node/pull/23581
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-19 18:31:51 -07:00
scabhi 3fda9860ec
test: reversed arguments in strictqual to reflect documentation
PR-URL: https://github.com/nodejs/node/pull/23494
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-10-15 12:00:00 +02:00
John-David Dalton b6dcf8c012 Revert "module: fix inconsistency between load and _findPath"
This reverts commit 1b92214
from PR #22382.

See the discussion at
https://github.com/nodejs/citgm/issues/604

PR-URL: https://github.com/nodejs/node/pull/23228
Refs: https://github.com/nodejs/node/pull/22382
Fixes: https://github.com/nodejs/node/issues/4778
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-10 11:07:38 +02:00
Denys Otrishko 1b92214d09
module: fix inconsistency between load and _findPath
Files with multiple extensions are not handled by require-module system
therefore if you have file 'file.foo.bar' and require('./file') it won't
be found even while using require.extensions['foo.bar'] but before this
commit if you have require.extensions['foo.bar'] and
require.extensions['bar'] set then the latter will be called if you do
require('./file') but if you remove the former the former ('foo.bar')
property it will fail.
This commit makes it always fail in such cases.

Fixes: https://github.com/nodejs/node/issues/4778

PR-URL: https://github.com/nodejs/node/pull/22382
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-17 17:41:42 +02:00
Michaël Zasso df08779e0d
test: make crashOnUnhandleRejection opt-out
This commit removes `common.crashOnUnhandledRejection()` and adds
`common.disableCrashOnUnhandledRejection()`.

To reduce the risk of mistakes and make writing tests that involve
promises simpler, always install the unhandledRejection hook in tests
and provide a way to disable it for the rare cases where it's needed.

PR-URL: https://github.com/nodejs/node/pull/21849
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-19 08:47:28 +02:00
Anna Henningsen 229dca3dee
test,tools: enable running tests under workers
Enable running tests inside workers by passing `--worker`
to `tools/test.py`. A number of tests are marked as skipped,
or have been slightly altered to fit the different environment.

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-06 19:44:11 +02:00
Rich Trott bf6ce47259 test: move tmpdir to submodule of common
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-31 22:11:07 -08:00
ryanmahan f5d9169ded test: change assert message to default
assert.strictEqual message argument removed to replace
with default assert message to show the expected vs
actual values

PR-URL: https://github.com/nodejs/node/pull/18259
Refs: https://github.com/nodejs/node/issues/13296
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-22 16:34:55 -08:00
Kyle Farnung 7c84f19455 test: remove orphaned entries from status
PR-URL: https://github.com/nodejs/node/pull/18092
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-01-11 09:59:44 -08:00
Rich Trott d6b1b84ca0 test: fix typo in test-inspector-cluster-port-clash.js
PR-URL: https://github.com/nodejs/node/pull/17782
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-20 08:46:04 -08:00
Zack Yang ab99a89020 test: use common.crashOnUnhandledRejection
Deal with crash case for unhandled rejection.

PR-URL: https://github.com/nodejs/node/pull/17217
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-22 12:01:12 -08:00
Michaël Zasso 363091dea5 test: add failing vm tests to known_issues
Currently, `Reflect.ownKeys(this)`, `Object.getOwnPropertyNames(this)`
and `Object.getOwnPropertySymbols(this)` when run in a sandbox, fails
to retrieve Symbol and non-enumerable values.

PR-URL: https://github.com/nodejs/node/pull/16410
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-27 10:27:14 +02:00
Franziska Hinkelmann 5856c836ea src: fix vm module for strict mode
This patch fixes the problem with variables that
are declared only on the sandbox but not on the
global proxy.

PR-URL: https://github.com/nodejs/node/pull/16487
Fixes: https://github.com/nodejs/node/issues/12300
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-10-27 10:12:02 +02:00
Franziska Hinkelmann ed116dc3c6 test: fix test for inherited properties on vm
The known issue is fixed with
https://github.com/nodejs/node/pull/16293.

The text needs to call `Object.hasOwnProperty(this)`
instead of `this.hasOwnProperty()`, otherwise `this` is
from the wrong context is used.

Add a second test case taken verbatim from issue
https://github.com/nodejs/node/issues/5350

PR-URL: https://github.com/nodejs/node/pull/16411
Fixes: https://github.com/nodejs/node/issues/5350
Ref: https://github.com/nodejs/node/pull/16293
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-25 17:23:40 +02:00
Franziska Hinkelmann f1d6b04ac9 src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
https://github.com/nodejs/node/issues/10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
https://github.com/nodejs/node/pull/13265

This PR requires a backport of
37a3a15c3e

PR-URL: https://github.com/nodejs/node/pull/16293
Fixes: https://github.com/nodejs/node/issues/2734
Fixes: https://github.com/nodejs/node/issues/10223
Fixes: https://github.com/nodejs/node/issues/11803
Fixes: https://github.com/nodejs/node/issues/11902
Ref: https://github.com/nodejs/node/issues/6283
Ref: https://github.com/nodejs/node/pull/15114
Ref: https://github.com/nodejs/node/pull/13265
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-10-23 14:35:09 +02:00
Rich Trott 6cfd77338a
test: remove invalid test
`test/known_issues/test-stdout-buffer-flush-on-exit.js` is invalid. The
behavior seen currently (with the test failing) is in accordance with
documentation which indicates that calling `process.exit()` may mean
scheduled asynchronous I/O does not happen. The documentation also
indicates that `process.stdout` is asynchronous when it is a POSIX pipe.

PR-URL: https://github.com/nodejs/node/pull/15320
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-13 17:15:11 -03:00
Miguel Angel Asencio Hurtado 9a5c3cf185
test: continue normalizing fixtures use
PR-URL: https://github.com/nodejs/node/pull/14716
Refs: https://github.com/nodejs/node/pull/14332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-08-27 21:14:34 -03:00
Franziska Hinkelmann 9e5d0e3d76 test: add known issue for vm module
GlobalPropertySetterCallback() does not check the
property on the sandbox. It wrongly throws an error
instead of updating `x`.

PR-URL: https://github.com/nodejs/node/pull/14661
Ref: https://github.com/nodejs/node/issues/12300
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-08-23 12:16:57 -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
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
章礼平 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
Daniel Bevenius f651e40350 test: check and fail inspector-cluster-port-clash
Currently this test fail when configured --without-inspector or
--without-ssl as it is expected to fail but the skipIfInspectorDisabled
check will exit as if the test was sucessful.

This commit checks if inspector support is available and fails the test
allowing the test to be skipped.

PR-URL: https://github.com/nodejs/node/pull/14074
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-06 13:58:50 +02:00
Vse Mozhet Byt 2d2986ae72 test: simplify test skipping
* Make common.skip() exit.

  Also add common.printSkipMessage() for partial skips.

* Don't make needless things before skip

PR-URL: https://github.com/nodejs/node/pull/14021
Fixes: https://github.com/nodejs/node/issues/14016
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-07-04 12:41:49 +03:00
Refael Ackermann fe2caf6fb5 test: fix test-inspector-port-zero-cluster
* re-implemented test to parse args instead of post binding (exit 12)
* saved failing case as known issue

PR-URL: https://github.com/nodejs/node/pull/13373
Fixes: https://github.com/nodejs/node/issues/13343
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-16 07:14:25 -04:00