argumentsReflect.js (532B)
1 // |reftest| skip-if(!xulRuntime.shell) 2 3 // Test reflect.parse on a function with arguments.length 4 let ast = Reflect.parse(`function f10() { 5 return arguments.length; 6 }`); 7 8 assertEq(ast.body[0].body.body[0].argument.object.type, "Identifier"); 9 assertEq(ast.body[0].body.body[0].argument.object.name, "arguments"); 10 assertEq(ast.body[0].body.body[0].argument.property.type, "Identifier"); 11 assertEq(ast.body[0].body.body[0].argument.property.name, "length"); 12 13 if (typeof reportCompare === "function") 14 reportCompare(0, 0, "ok");