add mocha test

This commit is contained in:
Fábio Santos 2018-03-25 20:35:12 +01:00
parent 190df0e062
commit 556a34ba34

View File

@ -23,6 +23,15 @@ describe("spidermonkey export/import sanity test", function() {
}); });
}); });
it("should not add unnecessary escape slashes to regexps", function() {
var input = "/[\\\\/]/;";
var ast = uglify.parse(input).to_mozilla_ast();
assert.equal(
uglify.AST_Node.from_mozilla_ast(ast).print_to_string(),
input
);
});
it("Should judge between directives and strings correctly on import", function() { it("Should judge between directives and strings correctly on import", function() {
var tests = [ var tests = [
{ {