summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2023-04-03 21:05:39 +0900
committerGitHub <noreply@github.com>2023-04-03 21:05:39 +0900
commit6d68392f8ae1b29626af8edc1666a889b69470a9 (patch)
tree258de97032ff34e71306d48842a2b812c003fd88 /cli/tests
parent3cd7abf73fa104526508984daef54bbb8e120310 (diff)
Revert "fix(cli): don't store blob and data urls in the module cache (#18261)" (#18572)
This reverts commit b4c61c146a50dea0c4a53d8d505a4308ea7da279. cc @nayeemrmn
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/lsp_tests.rs6
-rw-r--r--cli/tests/integration/watcher_tests.rs40
2 files changed, 6 insertions, 40 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs
index 50d3e4be2..fb95a17de 100644
--- a/cli/tests/integration/lsp_tests.rs
+++ b/cli/tests/integration/lsp_tests.rs
@@ -7486,6 +7486,12 @@ fn lsp_data_urls_with_jsx_compiler_option() {
"start": { "line": 1, "character": 0 },
"end": { "line": 1, "character": 1 }
}
+ }, {
+ "uri": "deno:/ed0224c51f7e2a845dfc0941ed6959675e5e3e3d2a39b127f0ff569c1ffda8d8/data_url.ts",
+ "range": {
+ "start": { "line": 0, "character": 7 },
+ "end": {"line": 0, "character": 14 },
+ },
}])
);
diff --git a/cli/tests/integration/watcher_tests.rs b/cli/tests/integration/watcher_tests.rs
index edc7fc842..58b703701 100644
--- a/cli/tests/integration/watcher_tests.rs
+++ b/cli/tests/integration/watcher_tests.rs
@@ -1122,46 +1122,6 @@ fn test_watch_unload_handler_error_on_drop() {
check_alive_then_kill(child);
}
-#[test]
-fn run_watch_blob_urls_reset() {
- let _g = util::http_server();
- let t = TempDir::new();
- let file_to_watch = t.path().join("file_to_watch.js");
- let file_content = r#"
- const prevUrl = localStorage.getItem("url");
- if (prevUrl == null) {
- console.log("first run, storing blob url");
- const url = URL.createObjectURL(
- new Blob(["export {}"], { type: "application/javascript" }),
- );
- await import(url); // this shouldn't insert into the fs module cache
- localStorage.setItem("url", url);
- } else {
- await import(prevUrl)
- .then(() => console.log("importing old blob url incorrectly works"))
- .catch(() => console.log("importing old blob url correctly failed"));
- }
- "#;
- write(&file_to_watch, file_content).unwrap();
- let mut child = util::deno_cmd()
- .current_dir(util::testdata_path())
- .arg("run")
- .arg("--watch")
- .arg(&file_to_watch)
- .env("NO_COLOR", "1")
- .stdout(std::process::Stdio::piped())
- .stderr(std::process::Stdio::piped())
- .spawn()
- .unwrap();
- let (mut stdout_lines, mut stderr_lines) = child_lines(&mut child);
- wait_contains("first run, storing blob url", &mut stdout_lines);
- wait_contains("finished", &mut stderr_lines);
- write(&file_to_watch, file_content).unwrap();
- wait_contains("importing old blob url correctly failed", &mut stdout_lines);
- wait_contains("finished", &mut stderr_lines);
- check_alive_then_kill(child);
-}
-
// Regression test for https://github.com/denoland/deno/issues/15465.
#[test]
fn run_watch_reload_once() {