Skip to content

Commit

Permalink
Add test case for issue #2719
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed May 30, 2023
1 parent c013cac commit 253c81c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion boa_engine/src/tests/env.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use indoc::indoc;

use crate::{run_test_actions, TestAction};
use crate::{run_test_actions, JsNativeErrorKind, TestAction};

#[test]
// https://github.com/boa-dev/boa/issues/2317
Expand Down Expand Up @@ -30,3 +30,19 @@ fn fun_block_eval_2317() {
),
]);
}

#[test]
// https://github.com/boa-dev/boa/issues/2719
fn with_env_not_panic() {
run_test_actions([TestAction::assert_native_error(
indoc! {r#"
with({ p1:1, }) {k[oa>>2]=d;}
{
let a12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 = 1,
b = "";
}
"#},
JsNativeErrorKind::Reference,
"k is not defined",
)]);
}

0 comments on commit 253c81c

Please sign in to comment.