test: fix proxy tab-completion test
Proxies support is now complete in V8. The tests needed slight modification to match the spec implementation. PR-URL: https://github.com/nodejs/node/pull/4722 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
This commit is contained in:
parent
9968941797
commit
01f82f0685
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user