Skip to content

Commit

Permalink
test: fix proxy tab-completion test
Browse files Browse the repository at this point in the history
Proxies support is now complete in V8. The tests needed slight modification to
match the spec implementation.

PR-URL: #4722
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
  • Loading branch information
ofrobots authored and Ali Sheikh committed Mar 4, 2016
1 parent 9968941 commit 01f82f0
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions test/parallel/test-repl-tab-complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,27 @@ testMe.complete('cus', common.mustCall(function(error, data) {
putIn.run(['.clear']);

putIn.run([
'var proxy = Proxy.create({});'
'var proxy = new Proxy({}, {ownKeys: () => { throw new Error(); }});'
]);

const proxyElements = [ [
'proxy.__defineGetter__',
'proxy.__defineSetter__',
'proxy.__lookupGetter__',
'proxy.__lookupSetter__',
'proxy.__proto__',
'proxy.constructor',
'proxy.hasOwnProperty',
'proxy.isPrototypeOf',
'proxy.propertyIsEnumerable',
'proxy.toLocaleString',
'proxy.toString',
'proxy.valueOf' ],
'proxy.' ];

testMe.complete('proxy.', common.mustCall(function(error, data) {
assert.strictEqual(error, null);
assert.deepEqual(data, [[], 'proxy.']);
assert.deepEqual(data, proxyElements);
}));

// Make sure tab completion does not include integer members of an Array
Expand Down

0 comments on commit 01f82f0

Please sign in to comment.