Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix test for inherited properties on vm #16411

Closed
wants to merge 1 commit into from

Conversation

fhinkel
Copy link
Member

@fhinkel fhinkel commented Oct 23, 2017

The known issue is fixed with
#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
#5350

Fixes: #5350
Refs: #16293

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 23, 2017
@fhinkel fhinkel added the vm Issues and PRs related to the vm subsystem. label Oct 23, 2017
assert.deepStrictEqual(Object.keys(sandbox), ['z', 'x']);

// Check that y is not an own property.
assert.strictEqual((Object.keys(sandbox)).indexOf('y'), -1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this assert. It's implicitly checked on line 37.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Deleted.

Now that most of the vm issues are fixed, we could go through and consolidate all the tests.

@fhinkel
Copy link
Member Author

fhinkel commented Oct 25, 2017

The known issue is fixed with
nodejs#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
nodejs#5350

Fixes: nodejs#5350
Refs: nodejs#16293
fhinkel added a commit to fhinkel/node that referenced this pull request Oct 25, 2017
The known issue is fixed with
nodejs#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
nodejs#5350

PR-URL: nodejs#16411
Fixes: nodejs#5350
Ref: nodejs#16293
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@fhinkel
Copy link
Member Author

fhinkel commented Oct 25, 2017

Thanks, landed as ed116dc

@lpinca lpinca closed this Oct 25, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
The known issue is fixed with
nodejs/node#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
nodejs/node#5350

PR-URL: nodejs/node#16411
Fixes: nodejs/node#5350
Ref: nodejs/node#16293
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
The known issue is fixed with
#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
#5350

PR-URL: #16411
Fixes: #5350
Ref: #16293
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@gibfahn
Copy link
Member

gibfahn commented Oct 30, 2017

Marked as dont-land-on as #16293 was, LMK if wrong.

addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
The known issue is fixed with
nodejs/node#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
nodejs/node#5350

PR-URL: nodejs/node#16411
Fixes: nodejs/node#5350
Ref: nodejs/node#16293
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sandbox inheritied properties flattened after vm.runInNewContext
7 participants