From 01f82f068516073a05082fdf7f060db4d3fb8762 Mon Sep 17 00:00:00 2001 From: Ali Ijaz Sheikh Date: Sun, 24 Jan 2016 08:47:14 -0800 Subject: [PATCH] test: fix proxy tab-completion test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Michaƫl Zasso --- test/parallel/test-repl-tab-complete.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-repl-tab-complete.js b/test/parallel/test-repl-tab-complete.js index f20630280f2254..3ec92432df874b 100644 --- a/test/parallel/test-repl-tab-complete.js +++ b/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