From e9ddc7a41ad7ea02172d88e95c82d007d8d5df63 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 6 Aug 2021 09:37:24 -0400 Subject: feat(repl): support exports in the REPL (#11592) --- cli/tests/integration/repl_tests.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cli/tests/integration/repl_tests.rs') diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index 955c27069..b96b398ae 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -422,6 +422,19 @@ fn import_declarations() { assert!(out.contains("hello!\n")); } +#[test] +fn exports_stripped() { + let (out, err) = util::run_and_collect_output( + true, + "repl", + Some(vec!["export default 5;", "export class Test {}"]), + Some(vec![("NO_COLOR".to_owned(), "1".to_owned())]), + false, + ); + assert!(out.contains("5\n")); + assert!(err.is_empty()); +} + #[test] fn eval_unterminated() { let (out, err) = util::run_and_collect_output( -- cgit v1.2.3