From f5e46c9bf2f50d66a953fa133161fc829cecff06 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sat, 10 Feb 2024 13:22:13 -0700 Subject: chore: move cli/tests/ -> tests/ (#22369) This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit. --- cli/tests/testdata/vendor/dynamic.ts | 3 --- cli/tests/testdata/vendor/dynamic_non_analyzable.ts | 4 ---- cli/tests/testdata/vendor/dynamic_non_existent.ts | 11 ----------- cli/tests/testdata/vendor/dynamic_non_existent.ts.out | 7 ------- cli/tests/testdata/vendor/logger.ts | 5 ----- cli/tests/testdata/vendor/mod.ts | 1 - cli/tests/testdata/vendor/npm_and_node_specifier.ts | 2 -- cli/tests/testdata/vendor/query_reexport.ts | 1 - 8 files changed, 34 deletions(-) delete mode 100644 cli/tests/testdata/vendor/dynamic.ts delete mode 100644 cli/tests/testdata/vendor/dynamic_non_analyzable.ts delete mode 100644 cli/tests/testdata/vendor/dynamic_non_existent.ts delete mode 100644 cli/tests/testdata/vendor/dynamic_non_existent.ts.out delete mode 100644 cli/tests/testdata/vendor/logger.ts delete mode 100644 cli/tests/testdata/vendor/mod.ts delete mode 100644 cli/tests/testdata/vendor/npm_and_node_specifier.ts delete mode 100644 cli/tests/testdata/vendor/query_reexport.ts (limited to 'cli/tests/testdata/vendor') diff --git a/cli/tests/testdata/vendor/dynamic.ts b/cli/tests/testdata/vendor/dynamic.ts deleted file mode 100644 index e2cbb0e59..000000000 --- a/cli/tests/testdata/vendor/dynamic.ts +++ /dev/null @@ -1,3 +0,0 @@ -const { Logger } = await import("./logger.ts"); - -export { Logger }; diff --git a/cli/tests/testdata/vendor/dynamic_non_analyzable.ts b/cli/tests/testdata/vendor/dynamic_non_analyzable.ts deleted file mode 100644 index 1847939f6..000000000 --- a/cli/tests/testdata/vendor/dynamic_non_analyzable.ts +++ /dev/null @@ -1,4 +0,0 @@ -const value = (() => "./logger.ts")(); -const { Logger } = await import(value); - -export { Logger }; diff --git a/cli/tests/testdata/vendor/dynamic_non_existent.ts b/cli/tests/testdata/vendor/dynamic_non_existent.ts deleted file mode 100644 index a48e2accb..000000000 --- a/cli/tests/testdata/vendor/dynamic_non_existent.ts +++ /dev/null @@ -1,11 +0,0 @@ -// this should still vendor -// deno-lint-ignore no-constant-condition -if (false) { - await import("./non-existent.js"); -} - -export class Logger { - log(text: string) { - console.log(text); - } -} diff --git a/cli/tests/testdata/vendor/dynamic_non_existent.ts.out b/cli/tests/testdata/vendor/dynamic_non_existent.ts.out deleted file mode 100644 index a1b2ade81..000000000 --- a/cli/tests/testdata/vendor/dynamic_non_existent.ts.out +++ /dev/null @@ -1,7 +0,0 @@ -Download http://localhost:4545/vendor/dynamic_non_existent.ts -Download http://localhost:4545/vendor/non-existent.js -Ignoring: Dynamic import not found "http://localhost:4545/vendor/non-existent.js". - at http://localhost:4545/vendor/dynamic_non_existent.ts:4:16 -Vendored 1 module into vendor/ directory. - -To use vendored modules, specify the `--import-map vendor/import_map.json` flag when invoking Deno subcommands or add an `"importMap": ""` entry to a deno.json file. diff --git a/cli/tests/testdata/vendor/logger.ts b/cli/tests/testdata/vendor/logger.ts deleted file mode 100644 index 97f603a48..000000000 --- a/cli/tests/testdata/vendor/logger.ts +++ /dev/null @@ -1,5 +0,0 @@ -export class Logger { - log(text: string) { - console.log(text); - } -} diff --git a/cli/tests/testdata/vendor/mod.ts b/cli/tests/testdata/vendor/mod.ts deleted file mode 100644 index 8824d1b2a..000000000 --- a/cli/tests/testdata/vendor/mod.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./logger.ts"; diff --git a/cli/tests/testdata/vendor/npm_and_node_specifier.ts b/cli/tests/testdata/vendor/npm_and_node_specifier.ts deleted file mode 100644 index 61962e836..000000000 --- a/cli/tests/testdata/vendor/npm_and_node_specifier.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as path } from "node:path"; -export { getValue, setValue } from "npm:@denotest/esm-basic"; diff --git a/cli/tests/testdata/vendor/query_reexport.ts b/cli/tests/testdata/vendor/query_reexport.ts deleted file mode 100644 index 5dfafb532..000000000 --- a/cli/tests/testdata/vendor/query_reexport.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./logger.ts?test"; -- cgit v1.2.3