Skip to content

Commit

Permalink
Add test for issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Mar 7, 2022
1 parent fea05da commit 680e181
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion boa_engine/src/syntax/parser/statement/iteration/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::syntax::{
op::{self, AssignOp, CompOp},
Const,
},
parser::tests::check_parser,
parser::tests::{check_invalid, check_parser},
};
use boa_interner::Interner;

Expand Down Expand Up @@ -179,3 +179,9 @@ fn do_while_spaces() {
&mut interner,
);
}

/// Checks rejection of const bindings without init in for loops
#[test]
fn reject_const_no_init_for_loop() {
check_invalid("for (const h;;);");
}

0 comments on commit 680e181

Please sign in to comment.