diff options
Diffstat (limited to 'tests/testdata')
178 files changed, 0 insertions, 1340 deletions
diff --git a/tests/testdata/bench/allow_all.ts b/tests/testdata/bench/allow_all.ts deleted file mode 100644 index b31aaf397..000000000 --- a/tests/testdata/bench/allow_all.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { assertEquals } from "../../../tests/util/std/assert/mod.ts"; - -const permissions: Deno.PermissionName[] = [ - "read", - "write", - "net", - "env", - "run", - "ffi", - "hrtime", -]; - -for (const name of permissions) { - Deno.bench({ - name: `${name} false`, - permissions: { - [name]: false, - }, - async fn() { - for await (const n of permissions) { - const status = await Deno.permissions.query({ name: n }); - assertEquals(status.state, "prompt"); - } - }, - }); - - Deno.bench({ - name: `${name} true`, - permissions: { - [name]: true, - }, - async fn() { - for await (const n of permissions) { - const status = await Deno.permissions.query({ name: n }); - if (n === name) { - assertEquals(status.state, "granted"); - } else { - assertEquals(status.state, "prompt"); - } - } - }, - }); -} diff --git a/tests/testdata/bench/allow_none.ts b/tests/testdata/bench/allow_none.ts deleted file mode 100644 index 0cf3c27ef..000000000 --- a/tests/testdata/bench/allow_none.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { unreachable } from "../../../tests/util/std/assert/mod.ts"; - -const permissions: Deno.PermissionName[] = [ - "read", - "write", - "net", - "env", - "run", - "ffi", - "hrtime", -]; - -for (const name of permissions) { - Deno.bench({ - name, - permissions: { - [name]: true, - }, - fn() { - unreachable(); - }, - }); -} diff --git a/tests/testdata/bench/before_unload_prevent_default.ts b/tests/testdata/bench/before_unload_prevent_default.ts deleted file mode 100644 index 2759d4659..000000000 --- a/tests/testdata/bench/before_unload_prevent_default.ts +++ /dev/null @@ -1,6 +0,0 @@ -addEventListener("beforeunload", (e) => { - // The worker should be killed once benchmarks are done regardless of this. - e.preventDefault(); -}); - -Deno.bench("foo", () => {}); diff --git a/tests/testdata/bench/bench_formatting.ts b/tests/testdata/bench/bench_formatting.ts deleted file mode 100644 index fdee15abb..000000000 --- a/tests/testdata/bench/bench_formatting.ts +++ /dev/null @@ -1,3 +0,0 @@ -Deno.bench("Date.now", () => { - Date.now(); -}); diff --git a/tests/testdata/bench/check_local_by_default.ts b/tests/testdata/bench/check_local_by_default.ts deleted file mode 100644 index 2ae8c2692..000000000 --- a/tests/testdata/bench/check_local_by_default.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as a from "http://localhost:4545/subdir/type_error.ts"; - -console.log(a.a); diff --git a/tests/testdata/bench/check_local_by_default2.ts b/tests/testdata/bench/check_local_by_default2.ts deleted file mode 100644 index 5177ff944..000000000 --- a/tests/testdata/bench/check_local_by_default2.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as a from "http://localhost:4545/subdir/type_error.ts"; - -const b: "b" = 12; - -console.log(a.a); -console.log(b); diff --git a/tests/testdata/bench/clear_timeout.ts b/tests/testdata/bench/clear_timeout.ts deleted file mode 100644 index 4148263ac..000000000 --- a/tests/testdata/bench/clear_timeout.ts +++ /dev/null @@ -1,5 +0,0 @@ -clearTimeout(setTimeout(() => {}, 1000)); - -Deno.bench("bench1", () => {}); -Deno.bench("bench2", () => {}); -Deno.bench("bench3", () => {}); diff --git a/tests/testdata/bench/collect.out b/tests/testdata/bench/collect.out deleted file mode 100644 index 03c75922b..000000000 --- a/tests/testdata/bench/collect.out +++ /dev/null @@ -1,18 +0,0 @@ -Check [WILDCARD]/bench/collect/bench.ts -Check [WILDCARD]/bench/collect/include/2_bench.ts -Check [WILDCARD]/bench/collect/include/bench.ts -cpu: [WILDCARD] -runtime: deno [WILDCARD] ([WILDCARD]) - -[WILDCARD]/bench/collect/bench.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ---------------------------------------------------------------- ----------------------------- - -[WILDCARD]/bench/collect/include/2_bench.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ---------------------------------------------------------------- ----------------------------- - -[WILDCARD]/bench/collect/include/bench.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ---------------------------------------------------------------- ----------------------------- - diff --git a/tests/testdata/bench/collect/bench.ts b/tests/testdata/bench/collect/bench.ts deleted file mode 100644 index e69de29bb..000000000 --- a/tests/testdata/bench/collect/bench.ts +++ /dev/null diff --git a/tests/testdata/bench/collect/deno.jsonc b/tests/testdata/bench/collect/deno.jsonc deleted file mode 100644 index 7f8f190d3..000000000 --- a/tests/testdata/bench/collect/deno.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "bench": { - "exclude": ["./ignore"] - } -} diff --git a/tests/testdata/bench/collect/deno.malformed.jsonc b/tests/testdata/bench/collect/deno.malformed.jsonc deleted file mode 100644 index 8e558fbcf..000000000 --- a/tests/testdata/bench/collect/deno.malformed.jsonc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "bench": { - "dont_know_this_field": {} - } -} diff --git a/tests/testdata/bench/collect/deno2.jsonc b/tests/testdata/bench/collect/deno2.jsonc deleted file mode 100644 index 653ab1e31..000000000 --- a/tests/testdata/bench/collect/deno2.jsonc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "bench": { - "include": ["./include/"], - "exclude": ["./ignore", "./include/2_bench.ts"] - } -} diff --git a/tests/testdata/bench/collect/ignore/bench.ts b/tests/testdata/bench/collect/ignore/bench.ts deleted file mode 100644 index 16fb63ba7..000000000 --- a/tests/testdata/bench/collect/ignore/bench.ts +++ /dev/null @@ -1 +0,0 @@ -throw new Error("this module should be ignored"); diff --git a/tests/testdata/bench/collect/include/2_bench.ts b/tests/testdata/bench/collect/include/2_bench.ts deleted file mode 100644 index e69de29bb..000000000 --- a/tests/testdata/bench/collect/include/2_bench.ts +++ /dev/null diff --git a/tests/testdata/bench/collect/include/bench.ts b/tests/testdata/bench/collect/include/bench.ts deleted file mode 100644 index e69de29bb..000000000 --- a/tests/testdata/bench/collect/include/bench.ts +++ /dev/null diff --git a/tests/testdata/bench/collect2.out b/tests/testdata/bench/collect2.out deleted file mode 100644 index 00b8bfc0d..000000000 --- a/tests/testdata/bench/collect2.out +++ /dev/null @@ -1,13 +0,0 @@ -Check [WILDCARD]/bench/collect/bench.ts -Check [WILDCARD]/bench/collect/include/bench.ts -cpu: [WILDCARD] -runtime: deno [WILDCARD] ([WILDCARD]) - -[WILDCARD]/bench/collect/bench.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ---------------------------------------------------------------- ----------------------------- - -[WILDCARD]/bench/collect/include/bench.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ---------------------------------------------------------------- ----------------------------- - diff --git a/tests/testdata/bench/collect_with_malformed_config.out b/tests/testdata/bench/collect_with_malformed_config.out deleted file mode 100644 index 92e5e29d2..000000000 --- a/tests/testdata/bench/collect_with_malformed_config.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Failed to parse "bench" configuration - -Caused by: - unknown field `dont_know_this_field`, expected one of `include`, `exclude`, `files` diff --git a/tests/testdata/bench/exit_sanitizer.ts b/tests/testdata/bench/exit_sanitizer.ts deleted file mode 100644 index 8e596b310..000000000 --- a/tests/testdata/bench/exit_sanitizer.ts +++ /dev/null @@ -1,11 +0,0 @@ -Deno.bench("exit(0)", function () { - Deno.exit(0); -}); - -Deno.bench("exit(1)", function () { - Deno.exit(1); -}); - -Deno.bench("exit(2)", function () { - Deno.exit(2); -}); diff --git a/tests/testdata/bench/explicit_start_and_end.ts b/tests/testdata/bench/explicit_start_and_end.ts deleted file mode 100644 index 60a3d10d7..000000000 --- a/tests/testdata/bench/explicit_start_and_end.ts +++ /dev/null @@ -1,50 +0,0 @@ -Deno.bench("start and end", (t) => { - const id = setInterval(() => {}, 1000); - t.start(); - Deno.inspect(id); - t.end(); - clearInterval(id); -}); - -Deno.bench("start only", (t) => { - const id = setInterval(() => {}, 1000); - t.start(); - Deno.inspect(id); - clearInterval(id); -}); - -Deno.bench("end only", (t) => { - const id = setInterval(() => {}, 1000); - Deno.inspect(id); - t.end(); - clearInterval(id); -}); - -Deno.bench("double start", (t) => { - const id = setInterval(() => {}, 1000); - t.start(); - t.start(); - Deno.inspect(id); - t.end(); - clearInterval(id); -}); - -let captured: Deno.BenchContext; - -Deno.bench("double end", (t) => { - captured = t; - const id = setInterval(() => {}, 1000); - t.start(); - Deno.inspect(id); - t.end(); - t.end(); - clearInterval(id); -}); - -Deno.bench("captured", () => { - const id = setInterval(() => {}, 1000); - captured!.start(); - Deno.inspect(id); - captured!.end(); - clearInterval(id); -}); diff --git a/tests/testdata/bench/explicit_start_and_end_low_precision.out b/tests/testdata/bench/explicit_start_and_end_low_precision.out deleted file mode 100644 index 6dc66cfcc..000000000 --- a/tests/testdata/bench/explicit_start_and_end_low_precision.out +++ /dev/null @@ -1,10 +0,0 @@ -cpu: [WILDCARD] -runtime: deno [WILDCARD] ([WILDCARD]) - -[WILDCARD]/explicit_start_and_end_low_precision.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ------------------------------------------------------------------------------ ----------------------------- -noop with start and end [WILDCARD] [WILDCARD]/iter[WILDCARD]([WILDCARD] … [WILDCARD]) [WILDCARD] -Warning: start() and end() calls in "noop with start and end" are ignored because it averages less -than 10µs per iteration. Remove them for better results. - diff --git a/tests/testdata/bench/explicit_start_and_end_low_precision.ts b/tests/testdata/bench/explicit_start_and_end_low_precision.ts deleted file mode 100644 index 23bdf19fe..000000000 --- a/tests/testdata/bench/explicit_start_and_end_low_precision.ts +++ /dev/null @@ -1,4 +0,0 @@ -Deno.bench("noop with start and end", (b) => { - b.start(); - b.end(); -}); diff --git a/tests/testdata/bench/fail.ts b/tests/testdata/bench/fail.ts deleted file mode 100644 index 33d70ce55..000000000 --- a/tests/testdata/bench/fail.ts +++ /dev/null @@ -1,30 +0,0 @@ -Deno.bench("bench0", () => { - throw new Error(); -}); -Deno.bench("bench1", () => { - throw new Error(); -}); -Deno.bench("bench2", () => { - throw new Error(); -}); -Deno.bench("bench3", () => { - throw new Error(); -}); -Deno.bench("bench4", () => { - throw new Error(); -}); -Deno.bench("bench5", () => { - throw new Error(); -}); -Deno.bench("bench6", () => { - throw new Error(); -}); -Deno.bench("bench7", () => { - throw new Error(); -}); -Deno.bench("bench8", () => { - throw new Error(); -}); -Deno.bench("bench9", () => { - throw new Error(); -}); diff --git a/tests/testdata/bench/filter.out b/tests/testdata/bench/filter.out deleted file mode 100644 index 970171e0b..000000000 --- a/tests/testdata/bench/filter.out +++ /dev/null @@ -1,20 +0,0 @@ -Check [WILDCARD]/bench/filter/a_bench.ts -Check [WILDCARD]/bench/filter/b_bench.ts -Check [WILDCARD]/bench/filter/c_bench.ts -cpu: [WILDCARD] -runtime: deno [WILDCARD] ([WILDCARD]) - -[WILDCARD]/bench/filter/a_bench.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ---------------------------------------------------------------- ----------------------------- -foo [WILDCARD] [WILDCARD]/iter[WILDCARD]([WILDCARD] … [WILDCARD]) [WILDCARD] - -[WILDCARD]/bench/filter/b_bench.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ---------------------------------------------------------------- ----------------------------- -foo [WILDCARD] [WILDCARD]/iter[WILDCARD]([WILDCARD] … [WILDCARD]) [WILDCARD] - -[WILDCARD]/bench/filter/c_bench.ts -benchmark time (avg) iter/s (min … max) p75 p99 p995 ---------------------------------------------------------------- ----------------------------- -foo [WILDCARD] [WILDCARD]/iter[WILDCARD]([WILDCARD] … [WILDCARD]) [WILDCARD] diff --git a/tests/testdata/bench/filter/a_bench.ts b/tests/testdata/bench/filter/a_bench.ts deleted file mode 100644 index fc4ef859c..000000000 --- a/tests/testdata/bench/filter/a_bench.ts +++ /dev/null @@ -1,3 +0,0 @@ -Deno.bench("foo", function () {}); -Deno.bench("bar", function () {}); -Deno.bench("baz", function () {}); diff --git a/tests/testdata/bench/filter/b_bench.ts b/tests/testdata/bench/filter/b_bench.ts deleted file mode 100644 index fc4ef859c..000000000 --- a/tests/testdata/bench/filter/b_bench.ts +++ /dev/null @@ -1,3 +0,0 @@ -Deno.bench("foo", function () {}); -Deno.bench("bar", function () {}); -Deno.bench("baz", function () {}); diff --git a/tests/testdata/bench/filter/c_bench.ts b/tests/testdata/bench/filter/c_bench.ts deleted file mode 100644 index fc4ef859c..000000000 --- a/tests/testdata/bench/filter/c_bench.ts +++ /dev/null @@ -1,3 +0,0 @@ -Deno.bench("foo", function () {}); -Deno.bench("bar", function () {}); -Deno.bench("baz", function () {}); diff --git a/tests/testdata/bench/finally_timeout.ts b/tests/testdata/bench/finally_timeout.ts deleted file mode 100644 index c49eb8da2..000000000 --- a/tests/testdata/bench/finally_timeout.ts +++ /dev/null @@ -1,11 +0,0 @@ -Deno.bench("error", function () { - const timer = setTimeout(() => null, 10000); - try { - throw new Error("fail"); - } finally { - clearTimeout(timer); - } -}); - -Deno.bench("success", function () { -}); diff --git a/tests/testdata/bench/group_baseline.ts b/tests/testdata/bench/group_baseline.ts deleted file mode 100644 index a86f6455c..000000000 --- a/tests/testdata/bench/group_baseline.ts +++ /dev/null @@ -1,15 +0,0 @@ -Deno.bench("noop", () => {}); -Deno.bench("noop2", { 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"); -}); - -Deno.bench("parse url 200x", { group: "url" }, () => { - for (let i = 0; i < 200; i++) { - new URL("https://deno.land/std/http/server.ts"); - } -}); diff --git a/tests/testdata/bench/ignore.ts b/tests/testdata/bench/ignore.ts deleted file mode 100644 index 0226fe76f..000000000 --- a/tests/testdata/bench/ignore.ts +++ /dev/null @@ -1,9 +0,0 @@ -for (let i = 0; i < 10; i++) { - Deno.bench({ - name: `bench${i}`, - ignore: true, - fn() { - throw new Error("unreachable"); - }, - }); -} diff --git a/tests/testdata/bench/ignore_permissions.ts b/tests/testdata/bench/ignore_permissions.ts deleted file mode 100644 index 0dcd9299f..000000000 --- a/tests/testdata/bench/ignore_permissions.ts +++ /dev/null @@ -1,16 +0,0 @@ -Deno.bench({ - name: "ignore", - permissions: { - read: true, - write: true, - net: true, - env: true, - run: true, - ffi: true, - hrtime: true, - }, - ignore: true, - fn() { - throw new Error("unreachable"); - }, -}); diff --git a/tests/testdata/bench/interval.ts b/tests/testdata/bench/interval.ts deleted file mode 100644 index 7eb588c59..000000000 --- a/tests/testdata/bench/interval.ts +++ /dev/null @@ -1 +0,0 @@ -setInterval(function () {}, 0); diff --git a/tests/testdata/bench/load_unload.ts b/tests/testdata/bench/load_unload.ts deleted file mode 100644 index 3653c135d..000000000 --- a/tests/testdata/bench/load_unload.ts +++ /dev/null @@ -1,22 +0,0 @@ -let interval: number | null = null; -addEventListener("load", () => { - if (interval) { - throw new Error("Interval is already set"); - } - - interval = setInterval(() => {}, 0); -}); - -addEventListener("unload", () => { - if (!interval) { - throw new Error("Interval was not set"); - } - - clearInterval(interval); -}); - -Deno.bench("bench", () => { - if (!interval) { - throw new Error("Interval was not set"); - } -}); diff --git a/tests/testdata/bench/meta.ts b/tests/testdata/bench/meta.ts deleted file mode 100644 index e32fdeea6..000000000 --- a/tests/testdata/bench/meta.ts +++ /dev/null @@ -1,2 +0,0 @@ -console.log("import.meta.main: %s", import.meta.main); -console.log("import.meta.url: %s", import.meta.url); diff --git a/tests/testdata/bench/multiple_group.ts b/tests/testdata/bench/multiple_group.ts deleted file mode 100644 index 165b5e201..000000000 --- a/tests/testdata/bench/multiple_group.ts +++ /dev/null @@ -1,15 +0,0 @@ -Deno.bench("noop", { group: "noop" }, () => {}); -Deno.bench("noop2", { group: "noop", baseline: true }, () => {}); - -Deno.bench("noop3", { group: "url" }, () => {}); - -Deno.bench("parse url 2x", { group: "url", baseline: true }, () => { - 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://jsr.io/@std/http/0.221.0/file_server.ts"); - } -}); diff --git a/tests/testdata/bench/no_check.ts b/tests/testdata/bench/no_check.ts deleted file mode 100644 index b159cabd6..000000000 --- a/tests/testdata/bench/no_check.ts +++ /dev/null @@ -1 +0,0 @@ -Deno.bench(); diff --git a/tests/testdata/bench/no_prompt_by_default.ts b/tests/testdata/bench/no_prompt_by_default.ts deleted file mode 100644 index 59359eebd..000000000 --- a/tests/testdata/bench/no_prompt_by_default.ts +++ /dev/null @@ -1,3 +0,0 @@ -Deno.bench("no prompt", async () => { - await Deno.readTextFile("./some_file.txt"); -}); diff --git a/tests/testdata/bench/no_prompt_with_denied_perms.ts b/tests/testdata/bench/no_prompt_with_denied_perms.ts deleted file mode 100644 index 2f0d63bbe..000000000 --- a/tests/testdata/bench/no_prompt_with_denied_perms.ts +++ /dev/null @@ -1,3 +0,0 @@ -Deno.bench("no prompt", { permissions: { read: false } }, async () => { - await Deno.readTextFile("./some_file.txt"); -}); diff --git a/tests/testdata/bench/no_run.ts b/tests/testdata/bench/no_run.ts deleted file mode 100644 index c7a5dc1e8..000000000 --- a/tests/testdata/bench/no_run.ts +++ /dev/null @@ -1,2 +0,0 @@ -const _value: string = 1; -console.log("this should not be run"); diff --git a/tests/testdata/bench/only.ts b/tests/testdata/bench/only.ts deleted file mode 100644 index 0129c024c..000000000 --- a/tests/testdata/bench/only.ts +++ /dev/null @@ -1,15 +0,0 @@ -Deno.bench({ - name: "before", - fn() {}, -}); - -Deno.bench({ - only: true, - name: "only", - fn() {}, -}); - -Deno.bench({ - name: "after", - fn() {}, -}); diff --git a/tests/testdata/bench/overloads.ts b/tests/testdata/bench/overloads.ts deleted file mode 100644 index 4f5887f79..000000000 --- a/tests/testdata/bench/overloads.ts +++ /dev/null @@ -1,6 +0,0 @@ -Deno.bench("bench0", () => {}); -Deno.bench(function bench1() {}); -Deno.bench({ name: "bench2", fn: () => {} }); -Deno.bench("bench3", { permissions: "none" }, () => {}); -Deno.bench({ name: "bench4" }, () => {}); -Deno.bench({ ignore: true }, function bench5() {}); diff --git a/tests/testdata/bench/pass.ts b/tests/testdata/bench/pass.ts deleted file mode 100644 index 48348d447..000000000 --- a/tests/testdata/bench/pass.ts +++ /dev/null @@ -1,10 +0,0 @@ -Deno.bench("bench0", () => {}); -Deno.bench("bench1", () => {}); -Deno.bench("bench2", () => {}); -Deno.bench("bench3", () => {}); -Deno.bench("bench4", () => {}); -Deno.bench("bench5", () => {}); -Deno.bench("bench6", () => {}); -Deno.bench("bench7", () => {}); -Deno.bench("bench8", () => {}); -Deno.bench("bench9", () => {}); diff --git a/tests/testdata/bench/quiet.ts b/tests/testdata/bench/quiet.ts deleted file mode 100644 index efeb366ff..000000000 --- a/tests/testdata/bench/quiet.ts +++ /dev/null @@ -1,15 +0,0 @@ -Deno.bench("console.log", function () { - console.log("log"); -}); - -Deno.bench("console.error", function () { - console.error("error"); -}); - -Deno.bench("console.info", function () { - console.info("info"); -}); - -Deno.bench("console.warn", function () { - console.info("warn"); -}); diff --git a/tests/testdata/bench/unhandled_rejection.ts b/tests/testdata/bench/unhandled_rejection.ts deleted file mode 100644 index 32f3111ea..000000000 --- a/tests/testdata/bench/unhandled_rejection.ts +++ /dev/null @@ -1,3 +0,0 @@ -new Promise((_resolve, reject) => { - reject(new Error("rejection")); -}); diff --git a/tests/testdata/bench/unresolved_promise.ts b/tests/testdata/bench/unresolved_promise.ts deleted file mode 100644 index 25fe70762..000000000 --- a/tests/testdata/bench/unresolved_promise.ts +++ /dev/null @@ -1 +0,0 @@ -await new Promise((_resolve, _reject) => {}); diff --git a/tests/testdata/cache/095_cache_with_bare_import.ts b/tests/testdata/cache/095_cache_with_bare_import.ts deleted file mode 100644 index c0748305d..000000000 --- a/tests/testdata/cache/095_cache_with_bare_import.ts +++ /dev/null @@ -1 +0,0 @@ -import "foo"; diff --git a/tests/testdata/cache/cache_extensionless.out b/tests/testdata/cache/cache_extensionless.out deleted file mode 100644 index 3694c67cb..000000000 --- a/tests/testdata/cache/cache_extensionless.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -Check http://localhost:4545/subdir/no_js_ext diff --git a/tests/testdata/cache/cache_random_extension.out b/tests/testdata/cache/cache_random_extension.out deleted file mode 100644 index 745a2e0e3..000000000 --- a/tests/testdata/cache/cache_random_extension.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -Check http://localhost:4545/subdir/no_js_ext@1.0.0 diff --git a/tests/testdata/cache/check_local_by_default.ts b/tests/testdata/cache/check_local_by_default.ts deleted file mode 100644 index 2ae8c2692..000000000 --- a/tests/testdata/cache/check_local_by_default.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as a from "http://localhost:4545/subdir/type_error.ts"; - -console.log(a.a); diff --git a/tests/testdata/cache/check_local_by_default2.ts b/tests/testdata/cache/check_local_by_default2.ts deleted file mode 100644 index 5177ff944..000000000 --- a/tests/testdata/cache/check_local_by_default2.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as a from "http://localhost:4545/subdir/type_error.ts"; - -const b: "b" = 12; - -console.log(a.a); -console.log(b); diff --git a/tests/testdata/cache/ignore_require.js b/tests/testdata/cache/ignore_require.js deleted file mode 100644 index a8ef15021..000000000 --- a/tests/testdata/cache/ignore_require.js +++ /dev/null @@ -1,2 +0,0 @@ -// deno-lint-ignore-file -require("invalid module specifier"); diff --git a/tests/testdata/cache/json_import/main.ts b/tests/testdata/cache/json_import/main.ts deleted file mode 100644 index 78273558f..000000000 --- a/tests/testdata/cache/json_import/main.ts +++ /dev/null @@ -1,2 +0,0 @@ -import asdf from "./test.json" assert { type: "json" }; -console.log(asdf); diff --git a/tests/testdata/cache/json_import/test.json b/tests/testdata/cache/json_import/test.json deleted file mode 100644 index 258849a68..000000000 --- a/tests/testdata/cache/json_import/test.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "foo": { - "bar": 1 - } -} diff --git a/tests/testdata/cache/redirect_cache.out b/tests/testdata/cache/redirect_cache.out deleted file mode 100644 index 8905c4529..000000000 --- a/tests/testdata/cache/redirect_cache.out +++ /dev/null @@ -1,5 +0,0 @@ -Download http://localhost:4548/subdir/redirects/a.ts -Download http://localhost:4546/subdir/redirects/a.ts -Download http://localhost:4545/subdir/redirects/a.ts -Download http://localhost:4545/subdir/redirects/b.ts -Check http://localhost:4548/subdir/redirects/a.ts diff --git a/tests/testdata/check/excluded_file_specified/check.out b/tests/testdata/check/excluded_file_specified/check.out deleted file mode 100644 index 2bc26aaaf..000000000 --- a/tests/testdata/check/excluded_file_specified/check.out +++ /dev/null @@ -1 +0,0 @@ -Warning No matching files found. diff --git a/tests/testdata/check/excluded_file_specified/deno.json b/tests/testdata/check/excluded_file_specified/deno.json deleted file mode 100644 index 039be18df..000000000 --- a/tests/testdata/check/excluded_file_specified/deno.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "types": ["./lib/types.d.ts"] - }, - "exclude": ["lib"] -} diff --git a/tests/testdata/check/excluded_file_specified/lib/types.d.ts b/tests/testdata/check/excluded_file_specified/lib/types.d.ts deleted file mode 100644 index a02ad0cbe..000000000 --- a/tests/testdata/check/excluded_file_specified/lib/types.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// deno-lint-ignore-file -declare var test: number; diff --git a/tests/testdata/check/types_dts/deno.json b/tests/testdata/check/types_dts/deno.json deleted file mode 100644 index 85f1549e0..000000000 --- a/tests/testdata/check/types_dts/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "types": [ - "./types.d.ts" - ] - } -} diff --git a/tests/testdata/check/types_dts/main.out b/tests/testdata/check/types_dts/main.out deleted file mode 100644 index c769989e3..000000000 --- a/tests/testdata/check/types_dts/main.out +++ /dev/null @@ -1 +0,0 @@ -Check file:///[WILDCARD]/check/types_dts/main.ts diff --git a/tests/testdata/check/types_dts/main.ts b/tests/testdata/check/types_dts/main.ts deleted file mode 100644 index ca375a094..000000000 --- a/tests/testdata/check/types_dts/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -console.log("Hello world!"); - -test.test(); diff --git a/tests/testdata/check/types_dts/types.d.ts b/tests/testdata/check/types_dts/types.d.ts deleted file mode 100644 index 141c2a3d3..000000000 --- a/tests/testdata/check/types_dts/types.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare class test { - static test(): void; -} diff --git a/tests/testdata/lint/no_slow_types/a.ts b/tests/testdata/lint/no_slow_types/a.ts deleted file mode 100644 index 3b399665d..000000000 --- a/tests/testdata/lint/no_slow_types/a.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function add(a: number, b: number) { - return a + b; -} diff --git a/tests/testdata/lint/no_slow_types/b.ts b/tests/testdata/lint/no_slow_types/b.ts deleted file mode 100644 index b96a79489..000000000 --- a/tests/testdata/lint/no_slow_types/b.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function addB(a: number, b: number) { - return a + b; -} - -export * from "./d.ts"; diff --git a/tests/testdata/lint/no_slow_types/c.ts b/tests/testdata/lint/no_slow_types/c.ts deleted file mode 100644 index 517aa3d21..000000000 --- a/tests/testdata/lint/no_slow_types/c.ts +++ /dev/null @@ -1,4 +0,0 @@ -// this one won't error because it's not an export -export function addC(a: number, b: number) { - return a + b; -} diff --git a/tests/testdata/lint/no_slow_types/d.ts b/tests/testdata/lint/no_slow_types/d.ts deleted file mode 100644 index babe9d81b..000000000 --- a/tests/testdata/lint/no_slow_types/d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// this one is re-exported via b.ts -export function addD(a: number, b: number) { - return a + b; -} diff --git a/tests/testdata/lint/no_slow_types/deno.json b/tests/testdata/lint/no_slow_types/deno.json deleted file mode 100644 index 2fd0af5f0..000000000 --- a/tests/testdata/lint/no_slow_types/deno.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@pkg/pkg", - "version": "1.0.0", - "exports": { - "./a": "./a.ts", - "./b": "./b.ts" - } -} diff --git a/tests/testdata/lint/no_slow_types/deno.non-package.json b/tests/testdata/lint/no_slow_types/deno.non-package.json deleted file mode 100644 index 2c63c0851..000000000 --- a/tests/testdata/lint/no_slow_types/deno.non-package.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/tests/testdata/lint/no_slow_types/no_slow_types.out b/tests/testdata/lint/no_slow_types/no_slow_types.out deleted file mode 100644 index 5828906e7..000000000 --- a/tests/testdata/lint/no_slow_types/no_slow_types.out +++ /dev/null @@ -1,35 +0,0 @@ -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]a.ts:1:17 - | -1 | export function add(a: number, b: number) { - | ^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]b.ts:1:17 - | -1 | export function addB(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]d.ts:2:17 - | -2 | export function addD(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -Found 3 problems -Checked 4 files diff --git a/tests/testdata/lint/no_slow_types/no_slow_types_entrypoint.out b/tests/testdata/lint/no_slow_types/no_slow_types_entrypoint.out deleted file mode 100644 index b8c1013bf..000000000 --- a/tests/testdata/lint/no_slow_types/no_slow_types_entrypoint.out +++ /dev/null @@ -1,35 +0,0 @@ -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]a.ts:1:17 - | -1 | export function add(a: number, b: number) { - | ^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]b.ts:1:17 - | -1 | export function addB(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]d.ts:2:17 - | -2 | export function addD(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -Found 3 problems -Checked 1 file diff --git a/tests/testdata/lint/no_slow_types_workspace/a/b.ts b/tests/testdata/lint/no_slow_types_workspace/a/b.ts deleted file mode 100644 index b96a79489..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/a/b.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function addB(a: number, b: number) { - return a + b; -} - -export * from "./d.ts"; diff --git a/tests/testdata/lint/no_slow_types_workspace/a/d.ts b/tests/testdata/lint/no_slow_types_workspace/a/d.ts deleted file mode 100644 index babe9d81b..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/a/d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// this one is re-exported via b.ts -export function addD(a: number, b: number) { - return a + b; -} diff --git a/tests/testdata/lint/no_slow_types_workspace/a/deno.json b/tests/testdata/lint/no_slow_types_workspace/a/deno.json deleted file mode 100644 index 5a971cd85..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/a/deno.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@pkg/a", - "version": "1.0.0", - "exports": { - "./a": "./mod.ts", - "./b": "./b.ts" - } -} diff --git a/tests/testdata/lint/no_slow_types_workspace/a/mod.ts b/tests/testdata/lint/no_slow_types_workspace/a/mod.ts deleted file mode 100644 index 3b399665d..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/a/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function add(a: number, b: number) { - return a + b; -} diff --git a/tests/testdata/lint/no_slow_types_workspace/b/deno.json b/tests/testdata/lint/no_slow_types_workspace/b/deno.json deleted file mode 100644 index c95aeb029..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/b/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "@pkg/b", - "version": "1.0.0", - "exports": "./mod.ts" -} diff --git a/tests/testdata/lint/no_slow_types_workspace/b/mod.ts b/tests/testdata/lint/no_slow_types_workspace/b/mod.ts deleted file mode 100644 index fa1c068de..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/b/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -// ok -export function addB(a: number, b: number): number { - return a + b; -} diff --git a/tests/testdata/lint/no_slow_types_workspace/c/deno.json b/tests/testdata/lint/no_slow_types_workspace/c/deno.json deleted file mode 100644 index 36d6e2e67..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/c/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "@pkg/c", - "version": "1.0.0", - "exports": "./mod_c.ts" -} diff --git a/tests/testdata/lint/no_slow_types_workspace/c/mod_c.ts b/tests/testdata/lint/no_slow_types_workspace/c/mod_c.ts deleted file mode 100644 index 632a90b65..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/c/mod_c.ts +++ /dev/null @@ -1,4 +0,0 @@ -// not ok -export function addC(a: number, b: number) { - return a + b; -} diff --git a/tests/testdata/lint/no_slow_types_workspace/deno.json b/tests/testdata/lint/no_slow_types_workspace/deno.json deleted file mode 100644 index e3dd981e5..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "workspaces": [ - "./a", - "./b", - "./c" - ] -} diff --git a/tests/testdata/lint/no_slow_types_workspace/output.out b/tests/testdata/lint/no_slow_types_workspace/output.out deleted file mode 100644 index 05f54099b..000000000 --- a/tests/testdata/lint/no_slow_types_workspace/output.out +++ /dev/null @@ -1,46 +0,0 @@ -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]b.ts:1:17 - | -1 | export function addB(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]d.ts:2:17 - | -2 | export function addD(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]mod.ts:1:17 - | -1 | export function add(a: number, b: number) { - | ^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -error[no-slow-types]: missing explicit return type in the public API - --> [WILDCARD]mod_c.ts:2:17 - | -2 | export function addC(a: number, b: number) { - | ^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - - -Found 4 problems -Checked 5 files diff --git a/tests/testdata/lockfile/basic/bench.nolock.out b/tests/testdata/lockfile/basic/bench.nolock.out deleted file mode 100644 index 83e4de242..000000000 --- a/tests/testdata/lockfile/basic/bench.nolock.out +++ /dev/null @@ -1,6 +0,0 @@ -Download http://localhost:4545/lockfile/basic/mod.ts -Check file:///[WILDCARD]/main.bench.ts -cpu: [WILDCARD] -runtime: [WILDCARD] - -[WILDCARD] diff --git a/tests/testdata/lockfile/basic/deno.json b/tests/testdata/lockfile/basic/deno.json deleted file mode 100644 index d6541b78e..000000000 --- a/tests/testdata/lockfile/basic/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "imports": { - "mod": "http://localhost:4545/lockfile/basic/mod.ts" - } -} diff --git a/tests/testdata/lockfile/basic/deno.lock b/tests/testdata/lockfile/basic/deno.lock deleted file mode 100644 index 42ab94f9b..000000000 --- a/tests/testdata/lockfile/basic/deno.lock +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": "2", - "remote": { - "http://localhost:4545/lockfile/basic/mod.ts": "invalid" - } -} diff --git a/tests/testdata/lockfile/basic/doc.nolock.out b/tests/testdata/lockfile/basic/doc.nolock.out deleted file mode 100644 index e2d66c027..000000000 --- a/tests/testdata/lockfile/basic/doc.nolock.out +++ /dev/null @@ -1 +0,0 @@ -Download http://localhost:4545/lockfile/basic/mod.ts diff --git a/tests/testdata/lockfile/basic/fail.out b/tests/testdata/lockfile/basic/fail.out deleted file mode 100644 index 6a808c0a5..000000000 --- a/tests/testdata/lockfile/basic/fail.out +++ /dev/null @@ -1,4 +0,0 @@ -Download http://localhost:4545/lockfile/basic/mod.ts -error: The source code is invalid, as it does not match the expected hash in the lock file. - Specifier: [WILDCARD]mod.ts - Lock file: [WILDCARD]deno.lock diff --git a/tests/testdata/lockfile/basic/info.nolock.out b/tests/testdata/lockfile/basic/info.nolock.out deleted file mode 100644 index d1ef82e49..000000000 --- a/tests/testdata/lockfile/basic/info.nolock.out +++ /dev/null @@ -1,8 +0,0 @@ -Download http://localhost:4545/lockfile/basic/mod.ts -local: [WILDCARD]main.ts -type: TypeScript -dependencies: 1 unique -size: [WILDCARD] - -file:///[WILDCARD]/main.ts ([WILDCARD]) -└── http://localhost:4545/lockfile/basic/mod.ts ([WILDCARD]) diff --git a/tests/testdata/lockfile/basic/main.bench.ts b/tests/testdata/lockfile/basic/main.bench.ts deleted file mode 100644 index 918adde2f..000000000 --- a/tests/testdata/lockfile/basic/main.bench.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { getValue } from "mod"; - -Deno.bench("bench", () => { - const testing = 1 + getValue(); - if (testing !== 6) { - throw "FAIL"; - } -}); diff --git a/tests/testdata/lockfile/basic/main.test.ts b/tests/testdata/lockfile/basic/main.test.ts deleted file mode 100644 index fe45c799d..000000000 --- a/tests/testdata/lockfile/basic/main.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { getValue } from "mod"; - -Deno.test("test", () => { - const testing = 1 + getValue(); - if (testing !== 6) { - throw "FAIL"; - } -}); diff --git a/tests/testdata/lockfile/basic/main.ts b/tests/testdata/lockfile/basic/main.ts deleted file mode 100644 index 8d07c8153..000000000 --- a/tests/testdata/lockfile/basic/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { getValue } from "mod"; - -console.log(getValue()); diff --git a/tests/testdata/lockfile/basic/test.nolock.out b/tests/testdata/lockfile/basic/test.nolock.out deleted file mode 100644 index 1332dfa8f..000000000 --- a/tests/testdata/lockfile/basic/test.nolock.out +++ /dev/null @@ -1,4 +0,0 @@ -Download http://localhost:4545/lockfile/basic/mod.ts -Check file:///[WILDCARD]/main.test.ts -running 1 test from [WILDCARD]/main.test.ts -[WILDCARD] diff --git a/tests/testdata/package_json/basic/lib.bench.out b/tests/testdata/package_json/basic/lib.bench.out deleted file mode 100644 index fa9c5efc6..000000000 --- a/tests/testdata/package_json/basic/lib.bench.out +++ /dev/null @@ -1,11 +0,0 @@ -Download http://localhost:4545/npm/registry/@denotest/esm-basic -Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz -Initialize @denotest/esm-basic@1.0.0 -Check file:///[WILDCARD]/lib.bench.ts -cpu: [WILDCARD] -runtime: [WILDCARD] - -file:///[WILDCARD]/lib.bench.ts -[WILDCARD] ----------------------------------------------------------------- ----------------------------- -should add [WILDCARD] diff --git a/tests/testdata/package_json/basic/lib.bench.ts b/tests/testdata/package_json/basic/lib.bench.ts deleted file mode 100644 index e6b79d025..000000000 --- a/tests/testdata/package_json/basic/lib.bench.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { add } from "./lib.ts"; - -Deno.bench("should add", () => { - if (add(1, 2) !== 3) { - throw new Error("Fail"); - } -}); diff --git a/tests/testdata/package_json/basic/main.cache.out b/tests/testdata/package_json/basic/main.cache.out deleted file mode 100644 index 1c729e2a3..000000000 --- a/tests/testdata/package_json/basic/main.cache.out +++ /dev/null @@ -1,3 +0,0 @@ -Download http://localhost:4545/npm/registry/@denotest/esm-basic -Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz -Initialize @denotest/esm-basic@1.0.0 diff --git a/tests/testdata/publish/allow_slow_types.out b/tests/testdata/publish/allow_slow_types.out deleted file mode 100644 index cd22c0ce7..000000000 --- a/tests/testdata/publish/allow_slow_types.out +++ /dev/null @@ -1,5 +0,0 @@ -Check file:///[WILDCARD]mod.ts -Warning Publishing a library with slow types is not recommended. This may lead to poor type checking performance for users of your package, may affect the quality of automatic documentation generation, and your package will not be shipped with a .d.ts file for Node.js users. -Publishing @foo/bar@1.1.0 ... -Successfully published @foo/bar@1.1.0 -Visit http://127.0.0.1:4250/@foo/bar@1.1.0 for details diff --git a/tests/testdata/publish/bare_node_builtins.out b/tests/testdata/publish/bare_node_builtins.out deleted file mode 100644 index c2cf2e2af..000000000 --- a/tests/testdata/publish/bare_node_builtins.out +++ /dev/null @@ -1,11 +0,0 @@ -Warning: Resolving "url" as "node:url" at file:///[WILDCARD]/publish/bare_node_builtins/mod.ts:1:22. If you want to use a built-in Node module, add a "node:" prefix. -Warning: Resolving "url" as "node:url" at file:///[WILDCARD]/publish/bare_node_builtins/mod.ts:1:22. If you want to use a built-in Node module, add a "node:" prefix. -Download http://localhost:4545/npm/registry/@types/node -Download http://localhost:4545/npm/registry/@types/node/node-18.16.19.tgz -Check file:///[WILDCARD]/publish/bare_node_builtins/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/bare_node_builtins/mod.ts -Simulating publish of @foo/bar@1.0.0 with files: - file:///[WILDCARD]/publish/bare_node_builtins/deno.json (87B) - file:///[WILDCARD]/publish/bare_node_builtins/mod.ts (121B) -Warning Aborting due to --dry-run diff --git a/tests/testdata/publish/bare_node_builtins/deno.json b/tests/testdata/publish/bare_node_builtins/deno.json deleted file mode 100644 index 213a7cec6..000000000 --- a/tests/testdata/publish/bare_node_builtins/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/bare_node_builtins/mod.ts b/tests/testdata/publish/bare_node_builtins/mod.ts deleted file mode 100644 index 04374d8b7..000000000 --- a/tests/testdata/publish/bare_node_builtins/mod.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as url from "url"; - -export function foobar(): { href: string } { - return url.pathToFileURL("/foo/bar"); -} diff --git a/tests/testdata/publish/bare_node_builtins_no_warnings.out b/tests/testdata/publish/bare_node_builtins_no_warnings.out deleted file mode 100644 index d8d43eff6..000000000 --- a/tests/testdata/publish/bare_node_builtins_no_warnings.out +++ /dev/null @@ -1,9 +0,0 @@ -Download http://localhost:4545/npm/registry/@types/node -Download http://localhost:4545/npm/registry/@types/node/node-18.16.19.tgz -Check file:///[WILDCARD]/publish/bare_node_builtins/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/bare_node_builtins/mod.ts -Simulating publish of @foo/bar@1.0.0 with files: - file:///[WILDCARD]/publish/bare_node_builtins/deno.json (87B) - file:///[WILDCARD]/publish/bare_node_builtins/mod.ts (121B) -Warning Aborting due to --dry-run diff --git a/tests/testdata/publish/deno_jsonc.out b/tests/testdata/publish/deno_jsonc.out deleted file mode 100644 index 820554943..000000000 --- a/tests/testdata/publish/deno_jsonc.out +++ /dev/null @@ -1,6 +0,0 @@ -Check file:///[WILDCARD]/publish/deno_jsonc/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/deno_jsonc/mod.ts -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/deno_jsonc/deno.jsonc b/tests/testdata/publish/deno_jsonc/deno.jsonc deleted file mode 100644 index 4c9dfb08c..000000000 --- a/tests/testdata/publish/deno_jsonc/deno.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -{ - // It's .jsonc file so it can have comments - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - }, - "imports": { - "@std/http": "./std_http.ts" - } -} diff --git a/tests/testdata/publish/deno_jsonc/mod.ts b/tests/testdata/publish/deno_jsonc/mod.ts deleted file mode 100644 index 6e8a61bae..000000000 --- a/tests/testdata/publish/deno_jsonc/mod.ts +++ /dev/null @@ -1,7 +0,0 @@ -import http from "@std/http"; - -export function foobar(): { fileServer(): void } { - return { - fileServer: http.fileServer, - }; -} diff --git a/tests/testdata/publish/deno_jsonc/std_http.ts b/tests/testdata/publish/deno_jsonc/std_http.ts deleted file mode 100644 index 9d57b36f3..000000000 --- a/tests/testdata/publish/deno_jsonc/std_http.ts +++ /dev/null @@ -1,6 +0,0 @@ -// temp until we get jsr:@std/http in the test server -export default { - fileServer() { - console.log("Hi"); - }, -}; diff --git a/tests/testdata/publish/dry_run.out b/tests/testdata/publish/dry_run.out deleted file mode 100644 index afc2ba66a..000000000 --- a/tests/testdata/publish/dry_run.out +++ /dev/null @@ -1,8 +0,0 @@ -Check file:///[WILDCARD]/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/mod.ts -Simulating publish of @foo/bar@1.0.0 with files: - [WILDCARD]deno.json (140B) - [WILDCARD]mod.ts (137B) - [WILDCARD]std_http.ts (119B) -Warning Aborting due to --dry-run diff --git a/tests/testdata/publish/has_slow_types.out b/tests/testdata/publish/has_slow_types.out deleted file mode 100644 index 43ac86658..000000000 --- a/tests/testdata/publish/has_slow_types.out +++ /dev/null @@ -1,22 +0,0 @@ -Check file:///[WILDCARD]/mod.ts -Checking for slow types in the public API... -error[missing-explicit-return-type]: missing explicit return type in the public API - --> [WILDCARD]mod.ts:2:17 - | -2 | export function getRandom() { - | ^^^^^^^^^ this function is missing an explicit return type - = hint: add an explicit return type to the function - - info: all functions in the public API must have an explicit return type - docs: https://jsr.io/go/slow-type-missing-explicit-return-type - -This package contains errors for slow types. Fixing these errors will: - - 1. Significantly improve your package users' type checking performance. - 2. Improve the automatic documentation generation. - 3. Enable automatic .d.ts generation for Node.js. - -Don't want to bother? You can choose to skip this step by -providing the --allow-slow-types flag. - -error: Found 1 problem diff --git a/tests/testdata/publish/has_slow_types/deno.json b/tests/testdata/publish/has_slow_types/deno.json deleted file mode 100644 index 5826e5529..000000000 --- a/tests/testdata/publish/has_slow_types/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.1.0", - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/has_slow_types/mod.ts b/tests/testdata/publish/has_slow_types/mod.ts deleted file mode 100644 index 025311049..000000000 --- a/tests/testdata/publish/has_slow_types/mod.ts +++ /dev/null @@ -1,4 +0,0 @@ -// requires an explicit type annotation of `number` -export function getRandom() { - return Math.random(); -} diff --git a/tests/testdata/publish/invalid_import.out b/tests/testdata/publish/invalid_import.out deleted file mode 100644 index f6742de95..000000000 --- a/tests/testdata/publish/invalid_import.out +++ /dev/null @@ -1,32 +0,0 @@ -Download http://localhost:4545/welcome.ts -Download http://localhost:4545/echo.ts -Download http://localhost:4545/npm/registry/chalk -Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz -Check file:///[WILDCARD]/mod.ts -Checking for slow types in the public API... -Check file://[WILDCARD]mod.ts -error[invalid-external-import]: invalid import to a non-JSR 'http' specifier - --> [WILDCARD]mod.ts:1:8 - | -1 | import "http://localhost:4545/welcome.ts"; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the specifier - = hint: replace this import with one from jsr or npm, or vendor the dependency into your package - - info: the import was resolved to 'http://localhost:4545/welcome.ts' - info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers - docs: https://jsr.io/go/invalid-external-import - -error[invalid-external-import]: invalid import to a non-JSR 'http' specifier - --> [WILDCARD]mod.ts:2:8 - | -2 | import "$echo"; - | ^^^^^^^ the specifier - = hint: replace this import with one from jsr or npm, or vendor the dependency into your package - - info: the import was resolved to 'http://localhost:4545/echo.ts' - info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers - docs: https://jsr.io/go/invalid-external-import - -error: Found 2 problems diff --git a/tests/testdata/publish/invalid_import/deno.json b/tests/testdata/publish/invalid_import/deno.json deleted file mode 100644 index 49b666d22..000000000 --- a/tests/testdata/publish/invalid_import/deno.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "imports": { - "$echo": "http://localhost:4545/echo.ts" - }, - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/invalid_import/mod.ts b/tests/testdata/publish/invalid_import/mod.ts deleted file mode 100644 index bdaf010e2..000000000 --- a/tests/testdata/publish/invalid_import/mod.ts +++ /dev/null @@ -1,9 +0,0 @@ -import "http://localhost:4545/welcome.ts"; -import "$echo"; - -import "data:application/javascript,console.log(1)"; -import "npm:chalk@5"; - -export function foobar(): string { - return "string"; -} diff --git a/tests/testdata/publish/invalid_import_esm_sh_suggestion.out b/tests/testdata/publish/invalid_import_esm_sh_suggestion.out deleted file mode 100644 index a014f3de6..000000000 --- a/tests/testdata/publish/invalid_import_esm_sh_suggestion.out +++ /dev/null @@ -1,20 +0,0 @@ -[WILDCARD] -Check file:///[WILDCARD]/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]mod.ts -error[invalid-external-import]: invalid import to a non-JSR 'http' specifier - --> [WILDCARD]mod.ts:1:8 - | -1 | import "http://esm.sh/react-dom@18.2.0/server"; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the specifier - = hint: replace this import with one from jsr or npm, or vendor the dependency into your package - | -1 | "npm:react-dom@18.2.0" - | ---------------------- try this specifier - - info: the import was resolved to 'http://esm.sh/react-dom@18.2.0/server' - info: this specifier is not allowed to be imported on jsr - info: jsr only supports importing `jsr:`, `npm:`, and `data:` specifiers - docs: https://jsr.io/go/invalid-external-import - -error: Found 1 problem diff --git a/tests/testdata/publish/invalid_import_esm_sh_suggestion/deno.json b/tests/testdata/publish/invalid_import_esm_sh_suggestion/deno.json deleted file mode 100644 index 49b666d22..000000000 --- a/tests/testdata/publish/invalid_import_esm_sh_suggestion/deno.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "imports": { - "$echo": "http://localhost:4545/echo.ts" - }, - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/invalid_import_esm_sh_suggestion/mod.ts b/tests/testdata/publish/invalid_import_esm_sh_suggestion/mod.ts deleted file mode 100644 index e597218ed..000000000 --- a/tests/testdata/publish/invalid_import_esm_sh_suggestion/mod.ts +++ /dev/null @@ -1,5 +0,0 @@ -import "http://esm.sh/react-dom@18.2.0/server"; - -export function foobar(): string { - return "string"; -} diff --git a/tests/testdata/publish/invalid_path.out b/tests/testdata/publish/invalid_path.out deleted file mode 100644 index d47cb01de..000000000 --- a/tests/testdata/publish/invalid_path.out +++ /dev/null @@ -1,11 +0,0 @@ -Check file://[WILDCARD]mod.ts -Checking for slow types in the public API... -Check file://[WILDCARD]mod.ts -error[invalid-path]: package path must not contain whitespace (found ' ') - --> [WILDCARD]path with spaces.txt - = hint: rename or remove the file, or add it to 'publish.exclude' in the config file - - info: to portably support all platforms, including windows, the allowed characters in package paths are limited - docs: https://jsr.io/go/invalid-path - -error: Found 1 problem diff --git a/tests/testdata/publish/invalid_path/deno.json b/tests/testdata/publish/invalid_path/deno.json deleted file mode 100644 index 213a7cec6..000000000 --- a/tests/testdata/publish/invalid_path/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/invalid_path/mod.ts b/tests/testdata/publish/invalid_path/mod.ts deleted file mode 100644 index 9e217d9b0..000000000 --- a/tests/testdata/publish/invalid_path/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function foobar(): string { - return "string"; -} diff --git a/tests/testdata/publish/invalid_path/path with spaces.txt b/tests/testdata/publish/invalid_path/path with spaces.txt deleted file mode 100644 index e69de29bb..000000000 --- a/tests/testdata/publish/invalid_path/path with spaces.txt +++ /dev/null diff --git a/tests/testdata/publish/javascript_decl_file.out b/tests/testdata/publish/javascript_decl_file.out deleted file mode 100644 index 48128e82f..000000000 --- a/tests/testdata/publish/javascript_decl_file.out +++ /dev/null @@ -1,5 +0,0 @@ -Check file:///[WILDCARD]/javascript_decl_file/mod.js -Checking for slow types in the public API... -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/javascript_decl_file/deno.json b/tests/testdata/publish/javascript_decl_file/deno.json deleted file mode 100644 index e5dbfa8d3..000000000 --- a/tests/testdata/publish/javascript_decl_file/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.js" - } -} diff --git a/tests/testdata/publish/javascript_decl_file/mod.d.ts b/tests/testdata/publish/javascript_decl_file/mod.d.ts deleted file mode 100644 index b2f6c69a8..000000000 --- a/tests/testdata/publish/javascript_decl_file/mod.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function getRandom(): number; diff --git a/tests/testdata/publish/javascript_decl_file/mod.js b/tests/testdata/publish/javascript_decl_file/mod.js deleted file mode 100644 index 2395e622b..000000000 --- a/tests/testdata/publish/javascript_decl_file/mod.js +++ /dev/null @@ -1,5 +0,0 @@ -/// <reference types="./mod.d.ts" /> - -export function getRandom() { - return Math.random(); -} diff --git a/tests/testdata/publish/javascript_missing_decl_file.out b/tests/testdata/publish/javascript_missing_decl_file.out deleted file mode 100644 index 08e92e320..000000000 --- a/tests/testdata/publish/javascript_missing_decl_file.out +++ /dev/null @@ -1,20 +0,0 @@ -Checking for slow types in the public API... -warning[unsupported-javascript-entrypoint]: used a JavaScript module without type declarations as an entrypoint - --> [WILDCARD]mod.js - = hint: add a type declaration (d.ts) for the JavaScript module, or rewrite it to TypeScript - - info: JavaScript files with no corresponding declaration require type inference to be type checked - info: fast check avoids type inference, so JavaScript entrypoints should be avoided - docs: https://jsr.io/go/slow-type-unsupported-javascript-entrypoint - -warning[unsupported-javascript-entrypoint]: used a JavaScript module without type declarations as an entrypoint - --> [WILDCARD]other.js - = hint: add a type declaration (d.ts) for the JavaScript module, or rewrite it to TypeScript - - info: JavaScript files with no corresponding declaration require type inference to be type checked - info: fast check avoids type inference, so JavaScript entrypoints should be avoided - docs: https://jsr.io/go/slow-type-unsupported-javascript-entrypoint - -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/javascript_missing_decl_file/deno.json b/tests/testdata/publish/javascript_missing_decl_file/deno.json deleted file mode 100644 index e12927c26..000000000 --- a/tests/testdata/publish/javascript_missing_decl_file/deno.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.js", - "./other": "./other.js" - } -} diff --git a/tests/testdata/publish/javascript_missing_decl_file/mod.js b/tests/testdata/publish/javascript_missing_decl_file/mod.js deleted file mode 100644 index 4a62fa5b4..000000000 --- a/tests/testdata/publish/javascript_missing_decl_file/mod.js +++ /dev/null @@ -1,3 +0,0 @@ -export function getRandom() { - return Math.random(); -} diff --git a/tests/testdata/publish/javascript_missing_decl_file/other.js b/tests/testdata/publish/javascript_missing_decl_file/other.js deleted file mode 100644 index 89ffb80ba..000000000 --- a/tests/testdata/publish/javascript_missing_decl_file/other.js +++ /dev/null @@ -1,3 +0,0 @@ -export function other() { - return Math.random(); -} diff --git a/tests/testdata/publish/jsr_jsonc/jsr.jsonc b/tests/testdata/publish/jsr_jsonc/jsr.jsonc deleted file mode 100644 index 4c9dfb08c..000000000 --- a/tests/testdata/publish/jsr_jsonc/jsr.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -{ - // It's .jsonc file so it can have comments - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - }, - "imports": { - "@std/http": "./std_http.ts" - } -} diff --git a/tests/testdata/publish/jsr_jsonc/mod.out b/tests/testdata/publish/jsr_jsonc/mod.out deleted file mode 100644 index 38b61d568..000000000 --- a/tests/testdata/publish/jsr_jsonc/mod.out +++ /dev/null @@ -1,6 +0,0 @@ -Check file:///[WILDCARD]/publish/jsr_jsonc/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/jsr_jsonc/mod.ts -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/jsr_jsonc/mod.ts b/tests/testdata/publish/jsr_jsonc/mod.ts deleted file mode 100644 index 6e8a61bae..000000000 --- a/tests/testdata/publish/jsr_jsonc/mod.ts +++ /dev/null @@ -1,7 +0,0 @@ -import http from "@std/http"; - -export function foobar(): { fileServer(): void } { - return { - fileServer: http.fileServer, - }; -} diff --git a/tests/testdata/publish/jsr_jsonc/std_http.ts b/tests/testdata/publish/jsr_jsonc/std_http.ts deleted file mode 100644 index 9d57b36f3..000000000 --- a/tests/testdata/publish/jsr_jsonc/std_http.ts +++ /dev/null @@ -1,6 +0,0 @@ -// temp until we get jsr:@std/http in the test server -export default { - fileServer() { - console.log("Hi"); - }, -}; diff --git a/tests/testdata/publish/missing_deno_json.out b/tests/testdata/publish/missing_deno_json.out deleted file mode 100644 index 2c074bf83..000000000 --- a/tests/testdata/publish/missing_deno_json.out +++ /dev/null @@ -1 +0,0 @@ -error: Couldn't find a deno.json, deno.jsonc, jsr.json or jsr.jsonc configuration file in [WILDCARD]
\ No newline at end of file diff --git a/tests/testdata/publish/missing_deno_json/main.ts b/tests/testdata/publish/missing_deno_json/main.ts deleted file mode 100644 index 8d9b8a22a..000000000 --- a/tests/testdata/publish/missing_deno_json/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function add(a: number, b: number): number { - return a + b; -} diff --git a/tests/testdata/publish/no_token.out b/tests/testdata/publish/no_token.out deleted file mode 100644 index 41415094c..000000000 --- a/tests/testdata/publish/no_token.out +++ /dev/null @@ -1 +0,0 @@ -error: No means to authenticate. Pass a token to `--token`[WILDCARD] diff --git a/tests/testdata/publish/node_specifier.out b/tests/testdata/publish/node_specifier.out deleted file mode 100644 index d3e4a367b..000000000 --- a/tests/testdata/publish/node_specifier.out +++ /dev/null @@ -1,8 +0,0 @@ -Download http://localhost:4545/npm/registry/@types/node -Download http://localhost:4545/npm/registry/@types/node/node-[WILDCARD].tgz -Check file:///[WILDCARD]/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/node_specifier/mod.ts -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/node_specifier/deno.json b/tests/testdata/publish/node_specifier/deno.json deleted file mode 100644 index 213a7cec6..000000000 --- a/tests/testdata/publish/node_specifier/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/node_specifier/mod.ts b/tests/testdata/publish/node_specifier/mod.ts deleted file mode 100644 index 9d8263709..000000000 --- a/tests/testdata/publish/node_specifier/mod.ts +++ /dev/null @@ -1,5 +0,0 @@ -import "node:http"; - -export function foobar(): string { - return "string"; -} diff --git a/tests/testdata/publish/package_json.out b/tests/testdata/publish/package_json.out deleted file mode 100644 index 7b54ce8da..000000000 --- a/tests/testdata/publish/package_json.out +++ /dev/null @@ -1,8 +0,0 @@ -Download http://localhost:4545/npm/registry/picocolors -Download http://localhost:4545/npm/registry/picocolors/picocolors-1.0.0.tgz -Check file:///[WILDCARD]/publish/package_json/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/package_json/mod.ts -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/package_json/deno.json b/tests/testdata/publish/package_json/deno.json deleted file mode 100644 index 6e2826ef5..000000000 --- a/tests/testdata/publish/package_json/deno.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - }, - "nodeModulesDir": false -} diff --git a/tests/testdata/publish/package_json/mod.ts b/tests/testdata/publish/package_json/mod.ts deleted file mode 100644 index ae98962fa..000000000 --- a/tests/testdata/publish/package_json/mod.ts +++ /dev/null @@ -1,9 +0,0 @@ -import pc from "picocolors"; - -export function add(a: number, b: number): number { - return a + b; -} - -export function getValue(): string { - return pc.green("hey"); -} diff --git a/tests/testdata/publish/package_json/package.json b/tests/testdata/publish/package_json/package.json deleted file mode 100644 index c1b171f4c..000000000 --- a/tests/testdata/publish/package_json/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@deno/foo", - "version": "0.0.1", - "dependencies": { - "picocolors": "*" - } -} diff --git a/tests/testdata/publish/sloppy_imports.out b/tests/testdata/publish/sloppy_imports.out deleted file mode 100644 index 342eccdc3..000000000 --- a/tests/testdata/publish/sloppy_imports.out +++ /dev/null @@ -1,10 +0,0 @@ -Warning Sloppy module resolution (hint: specify path to index.ts file in directory instead) - at file:///[WILDCARD]/publish/sloppy_imports/mod.ts:1:20 -Check file:///[WILDCARD]/publish/sloppy_imports/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/sloppy_imports/mod.ts -Simulating publish of @foo/bar@1.0.0 with files: - file:///[WILDCARD]/publish/sloppy_imports/b/index.ts (27B) - file:///[WILDCARD]/publish/sloppy_imports/deno.json (87B) - file:///[WILDCARD]/publish/sloppy_imports/mod.ts (35B) -Warning Aborting due to --dry-run diff --git a/tests/testdata/publish/sloppy_imports/b/index.ts b/tests/testdata/publish/sloppy_imports/b/index.ts deleted file mode 100644 index 1392bf6ba..000000000 --- a/tests/testdata/publish/sloppy_imports/b/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const PI = Math.PI; diff --git a/tests/testdata/publish/sloppy_imports/deno.json b/tests/testdata/publish/sloppy_imports/deno.json deleted file mode 100644 index 213a7cec6..000000000 --- a/tests/testdata/publish/sloppy_imports/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/sloppy_imports/mod.ts b/tests/testdata/publish/sloppy_imports/mod.ts deleted file mode 100644 index f5084bb3b..000000000 --- a/tests/testdata/publish/sloppy_imports/mod.ts +++ /dev/null @@ -1 +0,0 @@ -export { PI } from "./b"; diff --git a/tests/testdata/publish/sloppy_imports_no_warnings.out b/tests/testdata/publish/sloppy_imports_no_warnings.out deleted file mode 100644 index 8659010b7..000000000 --- a/tests/testdata/publish/sloppy_imports_no_warnings.out +++ /dev/null @@ -1,8 +0,0 @@ -Check file:///[WILDCARD]/publish/sloppy_imports/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/sloppy_imports/mod.ts -Simulating publish of @foo/bar@1.0.0 with files: - file:///[WILDCARD]/publish/sloppy_imports/b/index.ts (27B) - file:///[WILDCARD]/publish/sloppy_imports/deno.json (87B) - file:///[WILDCARD]/publish/sloppy_imports/mod.ts (35B) -Warning Aborting due to --dry-run diff --git a/tests/testdata/publish/sloppy_imports_not_enabled.out b/tests/testdata/publish/sloppy_imports_not_enabled.out deleted file mode 100644 index c2f74ad2c..000000000 --- a/tests/testdata/publish/sloppy_imports_not_enabled.out +++ /dev/null @@ -1,2 +0,0 @@ -error: [WILDCARD] Maybe specify path to 'index.ts' file in directory instead or run with --unstable-sloppy-imports - at file:///[WILDCARD]/sloppy_imports/mod.ts:1:20 diff --git a/tests/testdata/publish/successful.out b/tests/testdata/publish/successful.out deleted file mode 100644 index a3da4290d..000000000 --- a/tests/testdata/publish/successful.out +++ /dev/null @@ -1,6 +0,0 @@ -Check file:///[WILDCARD]/publish/successful/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/successful/mod.ts -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/successful_no_check.out b/tests/testdata/publish/successful_no_check.out deleted file mode 100644 index 01c53a9ba..000000000 --- a/tests/testdata/publish/successful_no_check.out +++ /dev/null @@ -1,4 +0,0 @@ -Checking for slow types in the public API... -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/symlink.out b/tests/testdata/publish/symlink.out deleted file mode 100644 index 9f89f5b7c..000000000 --- a/tests/testdata/publish/symlink.out +++ /dev/null @@ -1,15 +0,0 @@ -Check [WILDCARD]mod.ts -Checking for slow types in the public API... -Check [WILDCARD]mod.ts -warning[unsupported-file-type]: unsupported file type 'symlink' - --> [WILDCARD]symlink - = hint: remove the file, or add it to 'publish.exclude' in the config file - - info: only files and directories are supported - info: the file was ignored and will not be published - docs: https://jsr.io/go/unsupported-file-type - -Simulating publish of @foo/bar@1.0.0 with files: - [WILDCARD]deno.json (87B) - [WILDCARD]mod.ts (56B) -Warning Aborting due to --dry-run diff --git a/tests/testdata/publish/symlink/deno.json b/tests/testdata/publish/symlink/deno.json deleted file mode 100644 index 213a7cec6..000000000 --- a/tests/testdata/publish/symlink/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/symlink/mod.ts b/tests/testdata/publish/symlink/mod.ts deleted file mode 100644 index 9e217d9b0..000000000 --- a/tests/testdata/publish/symlink/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function foobar(): string { - return "string"; -} diff --git a/tests/testdata/publish/symlink/symlink b/tests/testdata/publish/symlink/symlink deleted file mode 120000 index 0df9bcd04..000000000 --- a/tests/testdata/publish/symlink/symlink +++ /dev/null @@ -1 +0,0 @@ -./mod.ts
\ No newline at end of file diff --git a/tests/testdata/publish/unanalyzable_dynamic_import.out b/tests/testdata/publish/unanalyzable_dynamic_import.out deleted file mode 100644 index 7f3ca5555..000000000 --- a/tests/testdata/publish/unanalyzable_dynamic_import.out +++ /dev/null @@ -1,16 +0,0 @@ -Check file://[WILDCARD]/mod.ts -Checking for slow types in the public API... -Check file://[WILDCARD]/mod.ts -warning[unanalyzable-dynamic-import]: unable to analyze dynamic import - --> [WILDCARD]mod.ts:2:14 - | -2 | await import("asd " + asd); - | ^^^^^^^^^^^^ the unanalyzable dynamic import - - info: after publishing this package, imports from the local import map / package.json do not work - info: dynamic imports that can not be analyzed at publish time will not be rewritten automatically - info: make sure the dynamic import is resolvable at runtime without an import map / package.json - -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/unanalyzable_dynamic_import/deno.json b/tests/testdata/publish/unanalyzable_dynamic_import/deno.json deleted file mode 100644 index 213a7cec6..000000000 --- a/tests/testdata/publish/unanalyzable_dynamic_import/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/unanalyzable_dynamic_import/mod.ts b/tests/testdata/publish/unanalyzable_dynamic_import/mod.ts deleted file mode 100644 index 291311385..000000000 --- a/tests/testdata/publish/unanalyzable_dynamic_import/mod.ts +++ /dev/null @@ -1,2 +0,0 @@ -const asd = "asd"; -await import("asd " + asd); diff --git a/tests/testdata/publish/unsupported_jsx_tsx/foo.jsx b/tests/testdata/publish/unsupported_jsx_tsx/foo.jsx deleted file mode 100644 index 021c2d49e..000000000 --- a/tests/testdata/publish/unsupported_jsx_tsx/foo.jsx +++ /dev/null @@ -1,5 +0,0 @@ -import { renderToString } from "npm:preact-render-to-string"; - -export default function render() { - return renderToString(<div>foo.tsx</div>); -} diff --git a/tests/testdata/publish/unsupported_jsx_tsx/foo.tsx b/tests/testdata/publish/unsupported_jsx_tsx/foo.tsx deleted file mode 100644 index 021c2d49e..000000000 --- a/tests/testdata/publish/unsupported_jsx_tsx/foo.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { renderToString } from "npm:preact-render-to-string"; - -export default function render() { - return renderToString(<div>foo.tsx</div>); -} diff --git a/tests/testdata/publish/unsupported_jsx_tsx/jsr.jsonc b/tests/testdata/publish/unsupported_jsx_tsx/jsr.jsonc deleted file mode 100644 index 7aea08842..000000000 --- a/tests/testdata/publish/unsupported_jsx_tsx/jsr.jsonc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - }, - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "npm:preact" - } -} diff --git a/tests/testdata/publish/unsupported_jsx_tsx/mod.out b/tests/testdata/publish/unsupported_jsx_tsx/mod.out deleted file mode 100644 index 5f085fb33..000000000 --- a/tests/testdata/publish/unsupported_jsx_tsx/mod.out +++ /dev/null @@ -1,17 +0,0 @@ -[WILDCARD] -Check file:///[WILDCARD]/publish/unsupported_jsx_tsx/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/publish/unsupported_jsx_tsx/mod.ts -warning[unsupported-jsx-tsx]: JSX and TSX files are currently not supported - --> [WILDCARD]foo.jsx - - info: follow https://github.com/jsr-io/jsr/issues/24 for updates - -warning[unsupported-jsx-tsx]: JSX and TSX files are currently not supported - --> [WILDCARD]foo.tsx - - info: follow https://github.com/jsr-io/jsr/issues/24 for updates - -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/publish/unsupported_jsx_tsx/mod.ts b/tests/testdata/publish/unsupported_jsx_tsx/mod.ts deleted file mode 100644 index 4631a829d..000000000 --- a/tests/testdata/publish/unsupported_jsx_tsx/mod.ts +++ /dev/null @@ -1,7 +0,0 @@ -import fooTsx from "./foo.tsx"; -import fooJsx from "./foo.jsx"; - -export function renderTsxJsx() { - console.log(fooTsx()); - console.log(fooJsx()); -} diff --git a/tests/testdata/publish/workspace.out b/tests/testdata/publish/workspace.out deleted file mode 100644 index 17f2dab3b..000000000 --- a/tests/testdata/publish/workspace.out +++ /dev/null @@ -1,12 +0,0 @@ -Publishing a workspace... -Check file:///[WILDCARD]/workspace/foo/mod.ts -Check file:///[WILDCARD]/workspace/bar/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/workspace/foo/mod.ts -Check file:///[WILDCARD]/workspace/bar/mod.ts -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details -Publishing @foo/foo@1.0.0 ... -Successfully published @foo/foo@1.0.0 -Visit http://127.0.0.1:4250/@foo/foo@1.0.0 for details diff --git a/tests/testdata/publish/workspace/bar/deno.json b/tests/testdata/publish/workspace/bar/deno.json deleted file mode 100644 index 213a7cec6..000000000 --- a/tests/testdata/publish/workspace/bar/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@foo/bar", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - } -} diff --git a/tests/testdata/publish/workspace/bar/mod.ts b/tests/testdata/publish/workspace/bar/mod.ts deleted file mode 100644 index 8d9b8a22a..000000000 --- a/tests/testdata/publish/workspace/bar/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function add(a: number, b: number): number { - return a + b; -} diff --git a/tests/testdata/publish/workspace/deno.json b/tests/testdata/publish/workspace/deno.json deleted file mode 100644 index 57602aab5..000000000 --- a/tests/testdata/publish/workspace/deno.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "workspaces": [ - "foo", - "bar" - ] -} diff --git a/tests/testdata/publish/workspace/foo/deno.json b/tests/testdata/publish/workspace/foo/deno.json deleted file mode 100644 index 79563d36c..000000000 --- a/tests/testdata/publish/workspace/foo/deno.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@foo/foo", - "version": "1.0.0", - "exports": { - ".": "./mod.ts" - }, - "imports": { - "bar": "jsr:@foo/bar@1" - } -} diff --git a/tests/testdata/publish/workspace/foo/mod.ts b/tests/testdata/publish/workspace/foo/mod.ts deleted file mode 100644 index adf584463..000000000 --- a/tests/testdata/publish/workspace/foo/mod.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as bar from "bar"; - -export function add(a: number, b: number): number { - return bar.add(a, b); -} diff --git a/tests/testdata/publish/workspace_individual.out b/tests/testdata/publish/workspace_individual.out deleted file mode 100644 index e734ae06e..000000000 --- a/tests/testdata/publish/workspace_individual.out +++ /dev/null @@ -1,6 +0,0 @@ -Check file:///[WILDCARD]/workspace/bar/mod.ts -Checking for slow types in the public API... -Check file:///[WILDCARD]/workspace/bar/mod.ts -Publishing @foo/bar@1.0.0 ... -Successfully published @foo/bar@1.0.0 -Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details diff --git a/tests/testdata/run/fetch/other.ts b/tests/testdata/run/fetch/other.ts deleted file mode 100644 index 91fe376b3..000000000 --- a/tests/testdata/run/fetch/other.ts +++ /dev/null @@ -1 +0,0 @@ -import "http://localhost:4545/subdir/mt_text_typescript.t1.ts"; diff --git a/tests/testdata/run/fetch/test.ts b/tests/testdata/run/fetch/test.ts deleted file mode 100644 index baa52775d..000000000 --- a/tests/testdata/run/fetch/test.ts +++ /dev/null @@ -1 +0,0 @@ -import "http://localhost:4545/subdir/mod2.ts"; diff --git a/tests/testdata/run/with_package_json/no_deno_json/main.out b/tests/testdata/run/with_package_json/no_deno_json/main.out deleted file mode 100644 index 402b30ed4..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/main.out +++ /dev/null @@ -1,4 +0,0 @@ -[WILDCARD]package.json file found at '[WILDCARD]with_package_json[WILDCARD]no_deno_json[WILDCARD]package.json' -[WILDCARD] -ok -[Function (anonymous)] Chalk [WILDCARD] diff --git a/tests/testdata/run/with_package_json/no_deno_json/main.ts b/tests/testdata/run/with_package_json/no_deno_json/main.ts deleted file mode 100644 index 1e6e50040..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/main.ts +++ /dev/null @@ -1,4 +0,0 @@ -import chalk from "chalk"; - -console.log("ok"); -console.log(chalk); diff --git a/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.out b/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.out deleted file mode 100644 index 7ed6ff82d..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.out +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.ts b/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.ts deleted file mode 100644 index 0f3785f91..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/no_package_json_imports.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(5); diff --git a/tests/testdata/run/with_package_json/no_deno_json/noconfig.out b/tests/testdata/run/with_package_json/no_deno_json/noconfig.out deleted file mode 100644 index b9f9a6dea..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/noconfig.out +++ /dev/null @@ -1,4 +0,0 @@ -[WILDCARD]package.json auto-discovery is disabled -[WILDCARD] -success -[WILDCARD] diff --git a/tests/testdata/run/with_package_json/no_deno_json/noconfig.ts b/tests/testdata/run/with_package_json/no_deno_json/noconfig.ts deleted file mode 100644 index 73b348fbc..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/noconfig.ts +++ /dev/null @@ -1,8 +0,0 @@ -// ensure the cwd is this directory -const cwd = Deno.cwd(); -if (!cwd.endsWith("no_deno_json")) { - console.log(cwd); - throw "FAIL"; -} else { - console.log("success"); -} diff --git a/tests/testdata/run/with_package_json/no_deno_json/package.json b/tests/testdata/run/with_package_json/no_deno_json/package.json deleted file mode 100644 index a85b890a8..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "dependencies": { - "@denotest/check-error": "1.0.0", - "chalk": "4" - }, - "devDependencies": { - "@denotest/cjs-default-export": "1.0.0" - } -} diff --git a/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js b/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js deleted file mode 100644 index 492a8fa40..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js +++ /dev/null @@ -1,3 +0,0 @@ -import "chalk"; -console.log(Deno.cwd()); -console.log(Deno.statSync("../node_modules")); diff --git a/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.out b/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.out deleted file mode 100644 index 0ec791960..000000000 --- a/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://[WILDCARD] -[WILDCARD]sub_dir -{ - [WILDCARD] - isDirectory: true, - [WILDCARD] -} diff --git a/tests/testdata/test/relative_pattern_dot_slash/deno.json b/tests/testdata/test/relative_pattern_dot_slash/deno.json deleted file mode 100644 index 7c2c4a5d3..000000000 --- a/tests/testdata/test/relative_pattern_dot_slash/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "test": { - "include": [ - "./test/**/*.test.mjs" - ] - } -} diff --git a/tests/testdata/test/relative_pattern_dot_slash/output.out b/tests/testdata/test/relative_pattern_dot_slash/output.out deleted file mode 100644 index be2961cff..000000000 --- a/tests/testdata/test/relative_pattern_dot_slash/output.out +++ /dev/null @@ -1,5 +0,0 @@ -running 1 test from ./test/add.test.mjs -should add ... ok ([WILDCARD]) - -ok | 1 passed | 0 failed ([WILDCARD]) - diff --git a/tests/testdata/test/relative_pattern_dot_slash/test/add.mjs b/tests/testdata/test/relative_pattern_dot_slash/test/add.mjs deleted file mode 100644 index 7d658310b..000000000 --- a/tests/testdata/test/relative_pattern_dot_slash/test/add.mjs +++ /dev/null @@ -1,3 +0,0 @@ -export function add(a, b) { - return a + b; -} diff --git a/tests/testdata/test/relative_pattern_dot_slash/test/add.test.mjs b/tests/testdata/test/relative_pattern_dot_slash/test/add.test.mjs deleted file mode 100644 index 7b21d2fbc..000000000 --- a/tests/testdata/test/relative_pattern_dot_slash/test/add.test.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import { add } from "./add.mjs"; - -Deno.test("should add", () => { - if (add(1, 2) !== 3) { - throw new Error("FAIL"); - } -}); |