Skip to content

Commit

Permalink
Adding test case for JS ReferenceError
Browse files Browse the repository at this point in the history
  • Loading branch information
kolipakakondal committed Jul 17, 2018
1 parent aa17fd1 commit 7454aae
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ public void teardown() throws Exception

protected abstract IParser createParser();

@Test
public void testReferenceError() throws Exception
{
parse("'string' = 2;" + EOL);
assertParseErrors("ReferenceError:1:1 Invalid left hand side for assignment\n" +
"'string' = 2;\n" +
" ^");
}

@Test
public void testEmptyStatement() throws Exception
{
Expand Down

0 comments on commit 7454aae

Please sign in to comment.