diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-02-10 13:22:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 20:22:13 +0000 |
commit | f5e46c9bf2f50d66a953fa133161fc829cecff06 (patch) | |
tree | 8faf2f5831c1c7b11d842cd9908d141082c869a5 /tools | |
parent | d2477f780630a812bfd65e3987b70c0d309385bb (diff) |
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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/copyright_checker.js | 6 | ||||
-rwxr-xr-x | tools/lint.js | 22 | ||||
-rw-r--r-- | tools/node_compat/TODO.md | 2 | ||||
-rwxr-xr-x | tools/node_compat/setup.ts | 8 |
4 files changed, 19 insertions, 19 deletions
diff --git a/tools/copyright_checker.js b/tools/copyright_checker.js index 8aaa77fa1..15bba2229 100644 --- a/tools/copyright_checker.js +++ b/tools/copyright_checker.js @@ -24,15 +24,15 @@ export async function checkCopyright() { "*.js", "*.ts", ":!:.github/mtime_cache/action.js", - ":!:cli/tests/testdata/**", + ":!:tests/testdata/**", ":!:cli/bench/testdata/**", ":!:cli/tsc/dts/**", ":!:cli/tsc/*typescript.js", ":!:cli/tsc/compiler.d.ts", ":!:test_util/wpt/**", ":!:cli/tools/init/templates/**", - ":!:cli/tests/unit_node/testdata/**", - ":!:cli/tests/node_compat/test/**", + ":!:tests/unit_node/testdata/**", + ":!:tests/node_compat/test/**", ":!:cli/tools/bench/mitata.rs", // rust diff --git a/tools/lint.js b/tools/lint.js index 0eae493fd..8d6e2e64a 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -41,22 +41,22 @@ async function dlint() { "*.js", "*.ts", ":!:.github/mtime_cache/action.js", - ":!:cli/tests/testdata/swc_syntax_error.ts", - ":!:cli/tests/testdata/error_008_checkjs.js", + ":!:tests/testdata/swc_syntax_error.ts", + ":!:tests/testdata/error_008_checkjs.js", ":!:cli/bench/testdata/npm/*", ":!:cli/bench/testdata/express-router.js", ":!:cli/bench/testdata/react-dom.js", ":!:cli/compilers/wasm_wrap.js", ":!:cli/tsc/dts/**", - ":!:cli/tests/testdata/encoding/**", - ":!:cli/tests/testdata/error_syntax.js", - ":!:cli/tests/testdata/file_extensions/ts_with_js_extension.js", - ":!:cli/tests/testdata/fmt/**", - ":!:cli/tests/testdata/npm/**", - ":!:cli/tests/testdata/lint/**", - ":!:cli/tests/testdata/run/**", - ":!:cli/tests/testdata/tsc/**", - ":!:cli/tests/testdata/test/glob/**", + ":!:tests/testdata/encoding/**", + ":!:tests/testdata/error_syntax.js", + ":!:tests/testdata/file_extensions/ts_with_js_extension.js", + ":!:tests/testdata/fmt/**", + ":!:tests/testdata/npm/**", + ":!:tests/testdata/lint/**", + ":!:tests/testdata/run/**", + ":!:tests/testdata/tsc/**", + ":!:tests/testdata/test/glob/**", ":!:cli/tsc/*typescript.js", ":!:cli/tsc/compiler.d.ts", ":!:test_util/wpt/**", diff --git a/tools/node_compat/TODO.md b/tools/node_compat/TODO.md index d22e8811d..eb288c65e 100644 --- a/tools/node_compat/TODO.md +++ b/tools/node_compat/TODO.md @@ -1,7 +1,7 @@ <!-- deno-fmt-ignore-file --> # Remaining Node Tests -NOTE: This file should not be manually edited. Please edit `cli/tests/node_compat/config.json` and run `deno task setup` in `tools/node_compat` dir instead. +NOTE: This file should not be manually edited. Please edit `tests/node_compat/config.json` and run `deno task setup` in `tools/node_compat` dir instead. Total: 2999 diff --git a/tools/node_compat/setup.ts b/tools/node_compat/setup.ts index 4770fbc50..47588350d 100755 --- a/tools/node_compat/setup.ts +++ b/tools/node_compat/setup.ts @@ -1,7 +1,7 @@ #!/usr/bin/env -S deno run --allow-read=. --allow-write=. --allow-run=git // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -/** This copies the test files according to the config file `cli/tests/node_compat/config.jsonc` */ +/** This copies the test files according to the config file `tests/node_compat/config.jsonc` */ import { walk } from "@test_util/std/fs/walk.ts"; import { sep } from "@test_util/std/path/mod.ts"; @@ -10,7 +10,7 @@ import { writeAll } from "@test_util/std/streams/write_all.ts"; import { withoutAll } from "@test_util/std/collections/without_all.ts"; import { relative } from "@test_util/std/path/posix.ts"; -import { config, ignoreList } from "../../cli/tests/node_compat/common.ts"; +import { config, ignoreList } from "../../tests/node_compat/common.ts"; const encoder = new TextEncoder(); @@ -39,7 +39,7 @@ const NODE_IGNORED_TEST_DIRS = [ const VENDORED_NODE_TEST = new URL("node/test/", import.meta.url); const NODE_COMPAT_TEST_DEST_URL = new URL( - "../../cli/tests/node_compat/test/", + "../../tests/node_compat/test/", import.meta.url, ); @@ -76,7 +76,7 @@ async function updateToDo() { await file.write(encoder.encode(`<!-- deno-fmt-ignore-file --> # Remaining Node Tests -NOTE: This file should not be manually edited. Please edit \`cli/tests/node_compat/config.json\` and run \`deno task setup\` in \`tools/node_compat\` dir instead. +NOTE: This file should not be manually edited. Please edit \`tests/node_compat/config.json\` and run \`deno task setup\` in \`tools/node_compat\` dir instead. Total: ${missingTests.length} |