chore(tests): Remove vestiges of cli/tests folder (#22712)

This commit is contained in:
Aapo Alasuutari 2024-03-05 22:49:21 +02:00 committed by GitHub
parent 942dcbad84
commit 3333d67335
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 11 deletions

View File

@ -26,7 +26,7 @@
"cli/tsc/dts/lib.dom*.d.ts", "cli/tsc/dts/lib.dom*.d.ts",
"cli/tsc/dts/lib.es*.d.ts", "cli/tsc/dts/lib.es*.d.ts",
"cli/tsc/dts/typescript.d.ts", "cli/tsc/dts/typescript.d.ts",
"cli/tests/node_compat/test", "tests/node_compat/test",
"tests/testdata/file_extensions/ts_with_js_extension.js", "tests/testdata/file_extensions/ts_with_js_extension.js",
"tests/testdata/fmt/badly_formatted.json", "tests/testdata/fmt/badly_formatted.json",
"tests/testdata/fmt/badly_formatted.md", "tests/testdata/fmt/badly_formatted.md",

View File

@ -12,6 +12,6 @@ trim_trailing_whitespace = true
insert_final_newline = unset insert_final_newline = unset
trim_trailing_whitespace = unset trim_trailing_whitespace = unset
[cli/tests/node_compat/test/**] [tests/node_compat/test/**]
insert_final_newline = unset insert_final_newline = unset
trim_trailing_whitespace = unset trim_trailing_whitespace = unset

View File

@ -24,7 +24,7 @@ import {
} from "./common.ts"; } from "./common.ts";
// If the test case is invoked like // If the test case is invoked like
// deno test -A cli/tests/node_compat/test.ts -- <test-names> // deno test -A tests/node_compat/test.ts -- <test-names>
// Use the <test-names> as filters // Use the <test-names> as filters
const filters = Deno.args; const filters = Deno.args;
const hasFilters = filters.length > 0; const hasFilters = filters.length > 0;
@ -108,7 +108,7 @@ async function runTest(t: Deno.TestContext, path: string): Promise<void> {
} }
const stderrOutput = decoder.decode(stderr); const stderrOutput = decoder.decode(stderr);
const repeatCmd = magenta( const repeatCmd = magenta(
`./target/debug/deno test -A cli/tests/node_compat/test.ts -- ${path}`, `./target/debug/deno test -A tests/node_compat/test.ts -- ${path}`,
); );
const msg = `"${magenta(path)}" failed: const msg = `"${magenta(path)}" failed:

View File

@ -11,18 +11,17 @@ Node.js compat testing in Deno repository.
- This script sets up the Node.js compat tests. - This script sets up the Node.js compat tests.
- `//tools/node_compat/versions/` - `//tools/node_compat/versions/`
- Node.js source tarballs and extracted test cases are stored here. - Node.js source tarballs and extracted test cases are stored here.
- `//cli/tests/node_compat/config.jsonc` - `//tests/node_compat/config.jsonc`
- This json file stores the settings about which Node.js compat test to run - This json file stores the settings about which Node.js compat test to run
with Deno. with Deno.
- `//cli/tests/node_compat/test` - `//tests/node_compat/test`
- The actual test cases are stored here. - The actual test cases are stored here.
## Steps to add new test cases from Node.js test cases ## Steps to add new test cases from Node.js test cases
1. Update `tests` property of `//cli/tests/node_compat/config.jsonc`. For 1. Update `tests` property of `//tests/node_compat/config.jsonc`. For example,
example, if you want to add `test/parallel/test-foo.js` from Node.js test if you want to add `test/parallel/test-foo.js` from Node.js test cases, then
cases, then add `test-foo.js` entry in `tests.parallel` array property in add `test-foo.js` entry in `tests.parallel` array property in `config.jsonc`
`config.jsonc`
1. Run `deno task setup` in `tools/node_compat` dir. 1. Run `deno task setup` in `tools/node_compat` dir.
The above command copies the updated items from Node.js tarball to the Deno The above command copies the updated items from Node.js tarball to the Deno

View File

@ -5,6 +5,6 @@
}, },
"tasks": { "tasks": {
"setup": "deno run --allow-read --allow-write ./setup.ts", "setup": "deno run --allow-read --allow-write ./setup.ts",
"test": "deno test -A ../../cli/tests/node_compat/test.ts --" "test": "deno test -A ../../tests/node_compat/test.ts --"
} }
} }