Update JS test to reflect typescript grammar changes

This commit is contained in:
Max Brunsfeld 2019-08-08 10:17:27 -07:00
parent b1a4cc044d
commit 52126a6606

View file

@ -194,7 +194,13 @@ describe("Parser", () => {
tree = parser.parse("a()\nb()\n[c]");
assert.equal(
tree.rootNode.toString(),
'(program (expression_statement (call_expression (identifier) (arguments))) (expression_statement (subscript_expression (call_expression (identifier) (arguments)) (identifier))))'
'(program ' +
'(expression_statement (call_expression function: (identifier) arguments: (arguments))) ' +
'(expression_statement (subscript_expression ' +
'object: (call_expression ' +
'function: (identifier) ' +
'arguments: (arguments)) ' +
'index: (identifier))))'
);
}).timeout(5000);
@ -203,7 +209,13 @@ describe("Parser", () => {
tree = parser.parse("a()\nb()\n[c]");
assert.equal(
tree.rootNode.toString(),
'(program (expression_statement (call_expression (identifier) (arguments))) (expression_statement (subscript_expression (call_expression (identifier) (arguments)) (identifier))))'
'(program ' +
'(expression_statement (call_expression function: (identifier) arguments: (arguments))) ' +
'(expression_statement (subscript_expression ' +
'object: (call_expression ' +
'function: (identifier) ' +
'arguments: (arguments)) ' +
'index: (identifier))))'
);
}).timeout(5000);