Browse Source

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>
process-exit-stdio-flushing
Ali Ijaz Sheikh 9 years ago
committed by Ali Sheikh
parent
commit
01f82f0685
  1. 19
      test/parallel/test-repl-tab-complete.js

19
test/parallel/test-repl-tab-complete.js

@ -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…
Cancel
Save