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>
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>
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>
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>
`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>
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>
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>
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>
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>
The file no longer works after the removal of the --debug/--debug-brk
switches in commit 47f8f74 ("src: remove support for --debug".)
This commit also removes several tests that still referenced the
old debugger but were either unit-testing its internals or passing
for the wrong reason (like expecting an operation to fail, which
it did because the debugger is gone.)
PR-URL: https://github.com/nodejs/node/pull/12495
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
If the current working directory is removed, Node cannot
start normally because the module system calls uv_cwd().
Refs: https://github.com/nodejs/node/pull/12022
PR-URL: https://github.com/nodejs/node/pull/12343
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
In the 2017-04-05 meeting, the CTC agreed to remove support for the
legacy debugger in 8.0.0. This is the first step in this direction.
Refs: https://github.com/nodejs/CTC/issues/94
PR-URL: https://github.com/nodejs/node/pull/12197
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Prototypes are not strict equal when they are from
different contexts. Therefore, assert.strictEqual()
fails for objects that are created in different
contexts, e.g., in vm.runInContext().
Instead of expecting the prototypes to be equal,
only check the properties of the objects
for equality.
PR-URL: https://github.com/nodejs/node/pull/11862
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
CopyProperties() causes sandboxed Proxy to throw error
when in fact no code has been run. The function will
be removed with the updates to the V8 API.
Here, failing Proxy test case is moved to known_issues.
PR-URL: https://github.com/nodejs/node/pull/11671
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
`test/known_issues/test-repl-function-redefinition-edge-case.js` had
been introduced as a part of https://github.com/nodejs/node/pull/7624
but the meat of the test became fixed in
007386ee81. Despite that, the test
continued to fail since it was broken itself: there was a missing colon
in the expected output.
This commit adds the missing colon and moves the test from
`test/known_issues` to `test/parallel`.
PR-URL: https://github.com/nodejs/node/pull/11772
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Make url-tests a js file so we can comment out
incompatible tests
PR-URL: https://github.com/nodejs/node/pull/11439
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Add two, admittedly contrived, examples that test
edge cases of the vm module.
They demonstrate that the if statements `if (maybe_rv.IsEmpty())` and
`if (maybe_prop_attr.IsNothing())` in the GetterCallback
and the QueryCallback are observable.
Both GetterCallback and QueryCallback
explicitly check the global_proxy() if a property is
not found on the sandbox. In these tests, the explicit check
inside the callback yields different results than deferring the
check until after the callback. The check is deferred, if the
callbacks do not intercept, i.e., if args.GetReturnValue().Set() is
not called.
PR-URL: https://github.com/nodejs/node/pull/11265
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
In the implementation of the vm module,
if a property is successfully deleted
on the sandbox, we also need to delete it
on the global_proxy object. Therefore, we
must not call args.GetReturnValue().Set().
We only intercept, i.e., call
args.GetReturnValue().Set(), in the
DeleterCallback, if Delete() failed, e.g. because
the property was read only.
PR-URL: https://github.com/nodejs/node/pull/11266
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Replace .map() + .replace().trim() with a single .replace().
PR-URL: https://github.com/nodejs/node/pull/11124
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
PR-URL: https://github.com/nodejs/node/pull/11024
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Manually fix issues that eslint --fix couldn't do automatically.
PR-URL: https://github.com/nodejs/node/pull/10685
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Deleting property in the vm context has no effect
as reported in https://github.com/nodejs/node/issues/6287
The test is moved to the known_issues and will be fixed
with the 5.5 V8 API changes.
PR-URL: https://github.com/nodejs/node/pull/10272
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In preparation for a lint rule that disallows empty lines at the end of
a file, remove such lines from a number of test files.
Refs: https://github.com/nodejs/node/issues/8918
PR-URL: https://github.com/nodejs/node/pull/8920
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
test-stdout-buffer-flush-on-exit is unfortunately non-deterministic. It
will, every so often, pass when it is supposed to fail. This is
currently guarded against by running the test with three different long
strings. This change increases it to five to reduce the false negatives.
PR-URL: https://github.com/nodejs/node/pull/6633
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Add `known_issues` tests to `make test` and `make test-ci` targets and
their equivalents on Windows.
PR-URL: https://github.com/nodejs/node/pull/6559
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>