Skip to content

Commit

Permalink
test: fix test_check_origin_not_supported (denoland#18504)
Browse files Browse the repository at this point in the history
Merge of dotland and dotcom caused this test to fail.
  • Loading branch information
bartlomieju committed Mar 30, 2023
1 parent 913e287 commit d418f79
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 231 deletions.
9 changes: 5 additions & 4 deletions cli/lsp/registries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1675,16 +1675,17 @@ mod tests {
let module_registry =
ModuleRegistry::new(&location, HttpClient::new(None, None).unwrap())
.unwrap();
let result = module_registry.check_origin("https://deno.com").await;
let result = module_registry.check_origin("https://example.com").await;
assert!(result.is_err());
let err = result.unwrap_err().to_string();
assert!(err
.contains("https://deno.com/.well-known/deno-import-intellisense.json"));
assert!(err.contains(
"https://example.com/.well-known/deno-import-intellisense.json"
));

// because we are caching an empty file when we hit an error with import
// detection when fetching the config file, we should have an error now that
// indicates trying to parse an empty file.
let result = module_registry.check_origin("https://deno.com").await;
let result = module_registry.check_origin("https://example.com").await;
assert!(result.is_err());
let err = result.unwrap_err().to_string();
assert!(err.contains("EOF while parsing a value at line 1 column 0"));
Expand Down
4 changes: 0 additions & 4 deletions cli/tests/node_compat/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,6 @@
"test-http-outgoing-message-inheritance.js",
"test-http-outgoing-renderHeaders.js",
"test-http-outgoing-settimeout.js",
"test-http-url.parse-auth.js",
"test-http-url.parse-path.js",
"test-http-url.parse-post.js",
"test-http-url.parse-search.js",
"test-net-access-byteswritten.js",
"test-net-better-error-messages-listen-path.js",
"test-net-better-error-messages-path.js",
Expand Down
55 changes: 0 additions & 55 deletions cli/tests/node_compat/test/parallel/test-http-url.parse-auth.js

This file was deleted.

53 changes: 0 additions & 53 deletions cli/tests/node_compat/test/parallel/test-http-url.parse-path.js

This file was deleted.

61 changes: 0 additions & 61 deletions cli/tests/node_compat/test/parallel/test-http-url.parse-post.js

This file was deleted.

54 changes: 0 additions & 54 deletions cli/tests/node_compat/test/parallel/test-http-url.parse-search.js

This file was deleted.

0 comments on commit d418f79

Please sign in to comment.