summaryrefslogtreecommitdiff
path: root/cli/tests/integration_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r--cli/tests/integration_tests.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index 606a40516..f892b9a87 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -693,6 +693,24 @@ fn repl_test_eof() {
assert!(err.is_empty());
}
+#[test]
+fn repl_test_strict() {
+ let (_, err) = util::run_and_collect_output(
+ true,
+ "repl",
+ Some(vec![
+ "let a = {};",
+ "Object.preventExtensions(a);",
+ "a.c = 1;",
+ ]),
+ None,
+ false,
+ );
+ assert!(err.contains(
+ "Uncaught TypeError: Cannot add property c, object is not extensible"
+ ));
+}
+
const REPL_MSG: &str = "exit using ctrl+d or close()\n";
#[test]