Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 01f82f0

Browse filesBrowse files
ofrobotsAli Sheikh
authored andcommitted
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 <info@bnoordhuis.nl> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
1 parent 9968941 commit 01f82f0
Copy full SHA for 01f82f0

File tree

Expand file treeCollapse file tree

1 file changed

+17
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-2
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-repl-tab-complete.js
+17-2Lines changed: 17 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.