summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/check_tests.rs9
-rw-r--r--tests/integration/lsp_tests.rs2
-rw-r--r--tests/testdata/bench/multiple_group.ts6
-rw-r--r--tests/testdata/jsr/registry/@std/assert/0.220.1/assert.ts4
-rw-r--r--tests/testdata/jsr/registry/@std/assert/0.220.1/fail.ts5
-rw-r--r--tests/testdata/jsr/registry/@std/assert/0.220.1/mod.ts2
-rw-r--r--tests/testdata/jsr/registry/@std/assert/0.220.1_meta.json4
-rw-r--r--tests/testdata/module_graph/file_tests-checkwithconfig.ts2
8 files changed, 26 insertions, 8 deletions
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": {
diff --git a/tests/testdata/bench/multiple_group.ts b/tests/testdata/bench/multiple_group.ts
index 69e73a7f2..165b5e201 100644
--- a/tests/testdata/bench/multiple_group.ts
+++ b/tests/testdata/bench/multiple_group.ts
@@ -4,12 +4,12 @@ Deno.bench("noop2", { group: "noop", baseline: true }, () => {});
Deno.bench("noop3", { group: "url" }, () => {});
Deno.bench("parse url 2x", { group: "url", baseline: true }, () => {
- new URL("https://deno.land/std/http/server.ts");
- new URL("https://deno.land/std/http/server.ts");
+ new URL("https://jsr.io/@std/http/0.221.0/file_server.ts");
+ new URL("https://jsr.io/@std/http/0.221.0/file_server.ts");
});
Deno.bench("parse url 200x", { group: "url" }, () => {
for (let i = 0; i < 200; i++) {
- new URL("https://deno.land/std/http/server.ts");
+ new URL("https://jsr.io/@std/http/0.221.0/file_server.ts");
}
});
diff --git a/tests/testdata/jsr/registry/@std/assert/0.220.1/assert.ts b/tests/testdata/jsr/registry/@std/assert/0.220.1/assert.ts
new file mode 100644
index 000000000..8c20c347a
--- /dev/null
+++ b/tests/testdata/jsr/registry/@std/assert/0.220.1/assert.ts
@@ -0,0 +1,4 @@
+// deno-lint-ignore-file
+export function assert(expr: unknown) {
+ return true;
+}
diff --git a/tests/testdata/jsr/registry/@std/assert/0.220.1/fail.ts b/tests/testdata/jsr/registry/@std/assert/0.220.1/fail.ts
new file mode 100644
index 000000000..6c21edda5
--- /dev/null
+++ b/tests/testdata/jsr/registry/@std/assert/0.220.1/fail.ts
@@ -0,0 +1,5 @@
+// deno-lint-ignore-file
+
+export function fail() {
+ return true;
+}
diff --git a/tests/testdata/jsr/registry/@std/assert/0.220.1/mod.ts b/tests/testdata/jsr/registry/@std/assert/0.220.1/mod.ts
index 2d7913a02..fdcb56c8c 100644
--- a/tests/testdata/jsr/registry/@std/assert/0.220.1/mod.ts
+++ b/tests/testdata/jsr/registry/@std/assert/0.220.1/mod.ts
@@ -18,3 +18,5 @@
*/
export * from "./assert_equals.ts";
+export * from "./assert.ts";
+export * from "./fail.ts";
diff --git a/tests/testdata/jsr/registry/@std/assert/0.220.1_meta.json b/tests/testdata/jsr/registry/@std/assert/0.220.1_meta.json
index 677928167..3ca2db93a 100644
--- a/tests/testdata/jsr/registry/@std/assert/0.220.1_meta.json
+++ b/tests/testdata/jsr/registry/@std/assert/0.220.1_meta.json
@@ -1,6 +1,8 @@
{
"exports": {
".": "./mod.ts",
- "./assert_equals": "./assert_equals.ts"
+ "./assert": "./assert.ts",
+ "./assert-equals": "./assert-equals.ts",
+ "./fail": "./fail.ts"
}
}
diff --git a/tests/testdata/module_graph/file_tests-checkwithconfig.ts b/tests/testdata/module_graph/file_tests-checkwithconfig.ts
index e7af5fa19..6628a1b63 100644
--- a/tests/testdata/module_graph/file_tests-checkwithconfig.ts
+++ b/tests/testdata/module_graph/file_tests-checkwithconfig.ts
@@ -1,4 +1,4 @@
-import { ServerRequest } from "https://deno.land/std/http/server.ts";
+import { ServerRequest } from "jsr:@std/http/server";
export default (req: ServerRequest) => {
req.respond({ body: `Hello, from Deno v${Deno.version.deno}!` });