From bac8e4f6f25367cf5b6c2095249cf144035a4fbd Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 1 Apr 2023 12:02:44 -0400 Subject: fix(repl): disable language server document preloading in the repl (#18543) This was an oversight because the repl uses the language server under the hood. Also, never preloads from a root directory. Part of #18538 --- cli/tests/integration/repl_tests.rs | 14 ++++++++++++++ 1 file changed, 14 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 c3e7c42d6..a473dc200 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -5,6 +5,7 @@ use test_util::assert_contains; use test_util::assert_ends_with; use test_util::assert_not_contains; use util::TempDir; +use util::TestContext; use util::TestContextBuilder; #[test] @@ -957,3 +958,16 @@ fn package_json_uncached_no_error() { console.expect("42") }); } + +#[test] +fn closed_file_pre_load_does_not_occur() { + TestContext::default() + .new_command() + .args_vec(["repl", "-A", "--log-level=debug"]) + .with_pty(|console| { + assert_contains!( + console.all_output(), + "Skipping document preload for repl.", + ); + }); +} -- cgit v1.2.3