From c6f1107e9c8835389479f4f2d80d3539d23df41e Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Thu, 11 Apr 2024 07:26:35 +1000 Subject: chore: update references to `deno_std` to use JSR (#23239) There are more uses of `deno.land/std` in the codebase, but for URL parsing purposes rather than network calls or documentation. --- tests/integration/check_tests.rs | 9 +++++++-- tests/integration/lsp_tests.rs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'tests/integration') diff --git a/tests/integration/check_tests.rs b/tests/integration/check_tests.rs index e97a40141..72fb2d9b7 100644 --- a/tests/integration/check_tests.rs +++ b/tests/integration/check_tests.rs @@ -215,7 +215,7 @@ fn reload_flag() { #[test] fn typecheck_declarations_ns() { - let context = TestContext::default(); + let context = TestContextBuilder::for_jsr().build(); let args = vec![ "test".to_string(), "--doc".to_string(), @@ -224,7 +224,12 @@ fn typecheck_declarations_ns() { .to_string_lossy() .into_owned(), ]; - let output = context.new_command().args_vec(args).split_output().run(); + let output = context + .new_command() + .args_vec(args) + .envs(util::env_vars_for_jsr_tests()) + .split_output() + .run(); println!("stdout: {}", output.stdout()); println!("stderr: {}", output.stderr()); diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index 96fb9507a..92a53a8b2 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -1400,7 +1400,7 @@ fn lsp_hover() { "language": "typescript", "value": "const Deno.args: string[]" }, - "Returns the script arguments to the program.\n\nGive the following command line invocation of Deno:\n\n```sh\ndeno run --allow-read https://examples.deno.land/command-line-arguments.ts Sushi\n```\n\nThen `Deno.args` will contain:\n\n```ts\n[ \"Sushi\" ]\n```\n\nIf you are looking for a structured way to parse arguments, there is the\n[`std/flags`](https://deno.land/std/flags) module as part of the Deno\nstandard library.", + "Returns the script arguments to the program.\n\nGive the following command line invocation of Deno:\n\n```sh\ndeno run --allow-read https://examples.deno.land/command-line-arguments.ts Sushi\n```\n\nThen `Deno.args` will contain:\n\n```ts\n[ \"Sushi\" ]\n```\n\nIf you are looking for a structured way to parse arguments, there is\n[`parseArgs()`](https://jsr.io/@std/cli/doc/parse-args/~/parseArgs) from\nthe Deno Standard Library.", "\n\n*@category* - Runtime Environment", ], "range": { -- cgit v1.2.3