Skip to content

Commit 298ff59

Browse files
committed
Update tests to reflect JS grammar changes
1 parent c0f1f30 commit 298ff59

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/node_test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ describe("Node", () => {
4141
assert.equal(bodyNode.constructor.name, 'StatementBlockNode');
4242

4343
const returnNode = bodyNode.namedChildren[0];
44-
assert.deepEqual(returnNode.fields, ['argumentNode'])
4544
assert.equal(returnNode.constructor.name, 'ReturnStatementNode');
4645

47-
const binaryNode = returnNode.argumentNode;
46+
const binaryNode = returnNode.firstNamedChild;
4847
assert.equal(binaryNode.constructor.name, 'BinaryExpressionNode');
4948

5049
assert.equal(binaryNode.leftNode.text, 'c')
@@ -379,7 +378,7 @@ describe("Node", () => {
379378
const node = tree.rootNode;
380379
assert.equal(
381380
node.toString(),
382-
"(program (expression_statement (parenthesized_expression value: (binary_expression left: (number) right: (MISSING identifier)))))"
381+
"(program (expression_statement (parenthesized_expression (binary_expression left: (number) right: (MISSING identifier)))))"
383382
);
384383

385384
const sum = node.firstChild.firstChild.firstNamedChild;

0 commit comments

Comments
 (0)