Browse Source

Add test case for issue #2719 (#2980)

pull/2981/head
José Julián Espina 1 year ago committed by GitHub
parent
commit
f9c26de90e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      boa_engine/src/tests/env.rs

18
boa_engine/src/tests/env.rs

@ -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
@ -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",
)]);
}

Loading…
Cancel
Save