test: failing behaviour on sandboxed Proxy#11671
test: failing behaviour on sandboxed Proxy#11671AnnaMag wants to merge 1 commit intonodejs:masterfrom
Conversation
|
cc/ @fhinkel |
|
I agree, that proxy should not throw. The fact that it does, is an implementation detail and should be a known issue rather than a test case. |
|
Can you address the linter issues: Thank you! |
|
Done, @fhinkel |
|
Unrelated failure in CI |
There was a problem hiding this comment.
Can you add an assert? I'd be nice to move this file from known_issue to test once the issue is addressed, and a test without an assert would be confusing.
There was a problem hiding this comment.
Great idea. Done & thanks!
There was a problem hiding this comment.
Don't we expect this to not throw?
We usually have an assert in the known issues, that asserts the correct behavior but is currently failing. So for this test, we want runInContext to not throw, but it currently does.
There was a problem hiding this comment.
Yes, true. We should be able to move it from /known_issues as is. Thanks!
There was a problem hiding this comment.
You're testing that the exception's error matches Sandbox throws..., which of course it doesn't because it is whoops. So the assert fails and it looks like the known issue passes. But we need to check that no exception is thrown, not that a made-up exception is not thrown.
Why don't we change the assert to
assert.doesNotThrow(() => vm.runInContext('', context));
and add a comment in the beginning of the test:
// Sandbox throws in CopyProperties() despite no code being run.
There was a problem hiding this comment.
Done. Thanks so much for pointing it out.
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.
|
Opened a tracking issue for the known-issue: #11902 |
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: #11671 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
|
Landed in 6473737 |
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: nodejs#11671 Reviewed-By: James M Snell <jasnell@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: nodejs#11671 Reviewed-By: James M Snell <jasnell@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: #11671 Reviewed-By: James M Snell <jasnell@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: #11671 Reviewed-By: James M Snell <jasnell@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: nodejs/node#11671 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
CopyProperties() causes sandboxed Proxy to throw error
despite no code being run. The CopyProperties() function
will be removed shortly with the updates to the V8 API.
Here, failing Proxy test case is moved to known_issues.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test