Skip to content

Instantly share code, notes, and snippets.

@avdg
Last active January 12, 2016 22:01
Show Gist options
  • Save avdg/d1372397b255e57408e8 to your computer and use it in GitHub Desktop.
Save avdg/d1372397b255e57408e8 to your computer and use it in GitHub Desktop.
Test262 test for failing test ch10\10.6\10.6-6-3 and ch10\10.6\10.6-6-4 in UglifyJS2
var UglifyJS = require('uglify-js'); // or require("./tools/node");
var ast = UglifyJS.parse("var arguments; var f = function() {arguments.length}");
ast.figure_out_scope();
if (ast.body[1].definitions[0].value.find_variable("arguments").scope === ast.body[1].definitions[0].value) {
console.log("TEST PASSED");
} else {
console.log("TEST FAILED");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment