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: add known_issues test for #5350 #10319

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/known_issues/test-vm-inherited_properties.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict';
// Ref: https://github.com/nodejs/node/issues/5350
Copy link
Member

Choose a reason for hiding this comment

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

We usually don't include Ref: when linking to issues. I can only find two tests that do that. (For consistency they probably shouldn't)

Copy link
Contributor

Choose a reason for hiding this comment

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

The known issue tests do.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it matters.

The more information possible the better, though.

Copy link
Member

Choose a reason for hiding this comment

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

I meant just get rid of Ref, not the link.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea. I meant the known issue tests (I think all of them) include Refs: at the top.

Copy link
Member

Choose a reason for hiding this comment

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

Never mind. Didn't realize that's the standard for known tests. Sorry for derailing the discussion.


require('../common');
const vm = require('vm');
const assert = require('assert');

const base = {
propBase: 1
};

const sandbox = Object.create(base, {
propSandbox: {value: 3}
});

const context = vm.createContext(sandbox);

const result = vm.runInContext('this.hasOwnProperty("propBase");', context);

assert.strictEqual(result, false);