summaryrefslogtreecommitdiff
path: root/cli/tests/integration/repl_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-04-01 12:02:44 -0400
committerGitHub <noreply@github.com>2023-04-01 12:02:44 -0400
commitbac8e4f6f25367cf5b6c2095249cf144035a4fbd (patch)
tree75f4c3f2174d1481d95942fd8200bc4fb8475b18 /cli/tests/integration/repl_tests.rs
parentae1ba2af3c0dc45de074285f0e0a8440cf2895ec (diff)
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
Diffstat (limited to 'cli/tests/integration/repl_tests.rs')
-rw-r--r--cli/tests/integration/repl_tests.rs14
1 files changed, 14 insertions, 0 deletions
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.",
+ );
+ });
+}