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.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index cb633bdd2..3853e6fe4 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -1059,6 +1059,32 @@ fn repl_test_console_log() {
}
#[test]
+fn repl_test_object_literal() {
+ let (out, err) = util::run_and_collect_output(
+ true,
+ "repl",
+ Some(vec!["{}", "{ foo: 'bar' }"]),
+ Some(vec![("NO_COLOR".to_owned(), "1".to_owned())]),
+ false,
+ );
+ assert!(out.ends_with("{}\n{ foo: \"bar\" }\n"));
+ assert!(err.is_empty());
+}
+
+#[test]
+fn repl_test_block_expression() {
+ let (out, err) = util::run_and_collect_output(
+ true,
+ "repl",
+ Some(vec!["{};", "{\"\"}"]),
+ Some(vec![("NO_COLOR".to_owned(), "1".to_owned())]),
+ false,
+ );
+ assert!(out.ends_with("undefined\n\"\"\n"));
+ assert!(err.is_empty());
+}
+
+#[test]
fn repl_cwd() {
let (_out, err) = util::run_and_collect_output(
true,