Skip to content

Commit 01f82f0

Browse files
ofrobotsAli Sheikh
authored and
Ali Sheikh
committed
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: #4722 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 9968941 commit 01f82f0

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

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

+17-2
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,27 @@ testMe.complete('cus', common.mustCall(function(error, data) {
223223
putIn.run(['.clear']);
224224

225225
putIn.run([
226-
'var proxy = Proxy.create({});'
226+
'var proxy = new Proxy({}, {ownKeys: () => { throw new Error(); }});'
227227
]);
228228

229+
const proxyElements = [ [
230+
'proxy.__defineGetter__',
231+
'proxy.__defineSetter__',
232+
'proxy.__lookupGetter__',
233+
'proxy.__lookupSetter__',
234+
'proxy.__proto__',
235+
'proxy.constructor',
236+
'proxy.hasOwnProperty',
237+
'proxy.isPrototypeOf',
238+
'proxy.propertyIsEnumerable',
239+
'proxy.toLocaleString',
240+
'proxy.toString',
241+
'proxy.valueOf' ],
242+
'proxy.' ];
243+
229244
testMe.complete('proxy.', common.mustCall(function(error, data) {
230245
assert.strictEqual(error, null);
231-
assert.deepEqual(data, [[], 'proxy.']);
246+
assert.deepEqual(data, proxyElements);
232247
}));
233248

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

0 commit comments

Comments
 (0)