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. --- ...o_doc_displays_all_overloads_in_details_view.ts | 6 --- ...c_displays_all_overloads_in_details_view.ts.out | 9 ---- cli/tests/testdata/doc/deno_doc.ts | 3 -- cli/tests/testdata/doc/deno_doc2.ts | 3 -- cli/tests/testdata/doc/deno_doc_builtin.out | 3 -- cli/tests/testdata/doc/import_map.json | 5 --- cli/tests/testdata/doc/invalid_url.out | 4 -- cli/tests/testdata/doc/lint_success.out | 1 - cli/tests/testdata/doc/lint_success.ts | 5 --- cli/tests/testdata/doc/lint_success_html.out | 1 - cli/tests/testdata/doc/lint_success_json.out | 50 ---------------------- cli/tests/testdata/doc/module/fun.js | 2 - .../testdata/doc/referenced_private_types.out | 12 ------ cli/tests/testdata/doc/referenced_private_types.ts | 7 --- .../doc/referenced_private_types_fixed.out | 1 - .../testdata/doc/referenced_private_types_fixed.ts | 11 ----- .../testdata/doc/referenced_private_types_lint.out | 28 ------------ cli/tests/testdata/doc/types_header.out | 6 --- cli/tests/testdata/doc/types_header.ts | 1 - cli/tests/testdata/doc/types_hint.out | 5 --- cli/tests/testdata/doc/types_hint.ts | 2 - cli/tests/testdata/doc/types_ref.js | 2 - cli/tests/testdata/doc/types_ref.out | 5 --- cli/tests/testdata/doc/use_import_map.js | 1 - cli/tests/testdata/doc/use_import_map.out | 5 --- 25 files changed, 178 deletions(-) delete mode 100644 cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts delete mode 100644 cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out delete mode 100644 cli/tests/testdata/doc/deno_doc.ts delete mode 100644 cli/tests/testdata/doc/deno_doc2.ts delete mode 100644 cli/tests/testdata/doc/deno_doc_builtin.out delete mode 100644 cli/tests/testdata/doc/import_map.json delete mode 100644 cli/tests/testdata/doc/invalid_url.out delete mode 100644 cli/tests/testdata/doc/lint_success.out delete mode 100644 cli/tests/testdata/doc/lint_success.ts delete mode 100644 cli/tests/testdata/doc/lint_success_html.out delete mode 100644 cli/tests/testdata/doc/lint_success_json.out delete mode 100644 cli/tests/testdata/doc/module/fun.js delete mode 100644 cli/tests/testdata/doc/referenced_private_types.out delete mode 100644 cli/tests/testdata/doc/referenced_private_types.ts delete mode 100644 cli/tests/testdata/doc/referenced_private_types_fixed.out delete mode 100644 cli/tests/testdata/doc/referenced_private_types_fixed.ts delete mode 100644 cli/tests/testdata/doc/referenced_private_types_lint.out delete mode 100644 cli/tests/testdata/doc/types_header.out delete mode 100644 cli/tests/testdata/doc/types_header.ts delete mode 100644 cli/tests/testdata/doc/types_hint.out delete mode 100644 cli/tests/testdata/doc/types_hint.ts delete mode 100644 cli/tests/testdata/doc/types_ref.js delete mode 100644 cli/tests/testdata/doc/types_ref.out delete mode 100644 cli/tests/testdata/doc/use_import_map.js delete mode 100644 cli/tests/testdata/doc/use_import_map.out (limited to 'cli/tests/testdata/doc') diff --git a/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts b/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts deleted file mode 100644 index 854c1b464..000000000 --- a/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts +++ /dev/null @@ -1,6 +0,0 @@ -// deno-lint-ignore-file -export namespace NS { - export function test(name: string, fn: Function): void; - export function test(options: object): void; - export function test(name: string | object, fn?: Function): void {} -} diff --git a/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out b/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out deleted file mode 100644 index 28d1cb921..000000000 --- a/cli/tests/testdata/doc/060_deno_doc_displays_all_overloads_in_details_view.ts.out +++ /dev/null @@ -1,9 +0,0 @@ -Defined in [WILDCARD]/060_deno_doc_displays_all_overloads_in_details_view.ts:3:3 - -function test(name: string, fn: Function): void - -Defined in [WILDCARD]/060_deno_doc_displays_all_overloads_in_details_view.ts:4:3 - -function test(options: object): void - - diff --git a/cli/tests/testdata/doc/deno_doc.ts b/cli/tests/testdata/doc/deno_doc.ts deleted file mode 100644 index fb3c50957..000000000 --- a/cli/tests/testdata/doc/deno_doc.ts +++ /dev/null @@ -1,3 +0,0 @@ -/** Some JSDoc */ -export function foo() { -} diff --git a/cli/tests/testdata/doc/deno_doc2.ts b/cli/tests/testdata/doc/deno_doc2.ts deleted file mode 100644 index ee6fc22dc..000000000 --- a/cli/tests/testdata/doc/deno_doc2.ts +++ /dev/null @@ -1,3 +0,0 @@ -/** Some JSDoc */ -export function bar() { -} diff --git a/cli/tests/testdata/doc/deno_doc_builtin.out b/cli/tests/testdata/doc/deno_doc_builtin.out deleted file mode 100644 index b4a90d6bc..000000000 --- a/cli/tests/testdata/doc/deno_doc_builtin.out +++ /dev/null @@ -1,3 +0,0 @@ -[WILDCARD] -namespace Deno -[WILDCARD] \ No newline at end of file diff --git a/cli/tests/testdata/doc/import_map.json b/cli/tests/testdata/doc/import_map.json deleted file mode 100644 index 244a30296..000000000 --- a/cli/tests/testdata/doc/import_map.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "imports": { - "rex/": "./module/" - } -} diff --git a/cli/tests/testdata/doc/invalid_url.out b/cli/tests/testdata/doc/invalid_url.out deleted file mode 100644 index 038c53177..000000000 --- a/cli/tests/testdata/doc/invalid_url.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Invalid URL 'https://raw.githubusercontent.com%2Fdyedgreen%2Fdeno-sqlite%2Frework_api%2Fmod.ts' - -Caused by: - invalid domain character diff --git a/cli/tests/testdata/doc/lint_success.out b/cli/tests/testdata/doc/lint_success.out deleted file mode 100644 index c05ac45a1..000000000 --- a/cli/tests/testdata/doc/lint_success.out +++ /dev/null @@ -1 +0,0 @@ -Checked 1 file diff --git a/cli/tests/testdata/doc/lint_success.ts b/cli/tests/testdata/doc/lint_success.ts deleted file mode 100644 index 42c44b2d7..000000000 --- a/cli/tests/testdata/doc/lint_success.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** My test class. */ -export class Test { - /** My property. */ - prop: string; -} diff --git a/cli/tests/testdata/doc/lint_success_html.out b/cli/tests/testdata/doc/lint_success_html.out deleted file mode 100644 index 9503a335f..000000000 --- a/cli/tests/testdata/doc/lint_success_html.out +++ /dev/null @@ -1 +0,0 @@ -Written 9 files to "./docs/" diff --git a/cli/tests/testdata/doc/lint_success_json.out b/cli/tests/testdata/doc/lint_success_json.out deleted file mode 100644 index 050b2540c..000000000 --- a/cli/tests/testdata/doc/lint_success_json.out +++ /dev/null @@ -1,50 +0,0 @@ -[ - { - "kind": "class", - "name": "Test", - "location": { - "filename": "file:///[WILDCARD]/lint_success.ts", - "line": 2, - "col": 0, - "byteIndex": 22 - }, - "declarationKind": "export", - "jsDoc": { - "doc": "My test class." - }, - "classDef": { - "isAbstract": false, - "constructors": [], - "properties": [ - { - "jsDoc": { - "doc": "My property." - }, - "tsType": { - "repr": "string", - "kind": "keyword", - "keyword": "string" - }, - "readonly": false, - "accessibility": null, - "optional": false, - "isAbstract": false, - "isStatic": false, - "name": "prop", - "location": { - "filename": "file:///[WILDCARD]/lint_success.ts", - "line": 4, - "col": 2, - "byteIndex": 66 - } - } - ], - "indexSignatures": [], - "methods": [], - "extends": null, - "implements": [], - "typeParams": [], - "superTypeParams": [] - } - } -] diff --git a/cli/tests/testdata/doc/module/fun.js b/cli/tests/testdata/doc/module/fun.js deleted file mode 100644 index 28901d945..000000000 --- a/cli/tests/testdata/doc/module/fun.js +++ /dev/null @@ -1,2 +0,0 @@ -/** This is some documentation */ -export function fun(_a, _b) {} diff --git a/cli/tests/testdata/doc/referenced_private_types.out b/cli/tests/testdata/doc/referenced_private_types.out deleted file mode 100644 index 3c91dbe15..000000000 --- a/cli/tests/testdata/doc/referenced_private_types.out +++ /dev/null @@ -1,12 +0,0 @@ -Defined in file:///[WILDCARD]/doc/referenced_private_types.ts:5:1 - -class MyClass - - prop: MyInterface - -Defined in file:///[WILDCARD]/doc/referenced_private_types.ts:1:1 - -private interface MyInterface - - prop?: string - diff --git a/cli/tests/testdata/doc/referenced_private_types.ts b/cli/tests/testdata/doc/referenced_private_types.ts deleted file mode 100644 index 9570d4625..000000000 --- a/cli/tests/testdata/doc/referenced_private_types.ts +++ /dev/null @@ -1,7 +0,0 @@ -interface MyInterface { - prop?: string; -} - -export class MyClass { - prop: MyInterface = {}; -} diff --git a/cli/tests/testdata/doc/referenced_private_types_fixed.out b/cli/tests/testdata/doc/referenced_private_types_fixed.out deleted file mode 100644 index c05ac45a1..000000000 --- a/cli/tests/testdata/doc/referenced_private_types_fixed.out +++ /dev/null @@ -1 +0,0 @@ -Checked 1 file diff --git a/cli/tests/testdata/doc/referenced_private_types_fixed.ts b/cli/tests/testdata/doc/referenced_private_types_fixed.ts deleted file mode 100644 index cd99bc76e..000000000 --- a/cli/tests/testdata/doc/referenced_private_types_fixed.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** Doc comment */ -export interface MyInterface { - /** Doc comment */ - prop?: string; -} - -/** Doc comment */ -export class MyClass { - /** Doc comment */ - prop: MyInterface = {}; -} diff --git a/cli/tests/testdata/doc/referenced_private_types_lint.out b/cli/tests/testdata/doc/referenced_private_types_lint.out deleted file mode 100644 index 328435cd7..000000000 --- a/cli/tests/testdata/doc/referenced_private_types_lint.out +++ /dev/null @@ -1,28 +0,0 @@ -error[missing-jsdoc]: exported symbol is missing JSDoc documentation - --> [WILDCARD]:5:1 - | -5 | export class MyClass { - | ^ - - -error[private-type-ref]: public type 'MyClass.prototype.prop' references private type 'MyInterface' - --> [WILDCARD]:6:3 - | -6 | prop: MyInterface = {}; - | ^ - = hint: make the referenced type public or remove the reference - | -1 | interface MyInterface { - | - this is the referenced type - - info: to ensure documentation is complete all types that are exposed in the public API must be public - - -error[missing-jsdoc]: exported symbol is missing JSDoc documentation - --> [WILDCARD]:6:3 - | -6 | prop: MyInterface = {}; - | ^ - - -error: Found 3 documentation lint errors. diff --git a/cli/tests/testdata/doc/types_header.out b/cli/tests/testdata/doc/types_header.out deleted file mode 100644 index a97b35dd7..000000000 --- a/cli/tests/testdata/doc/types_header.out +++ /dev/null @@ -1,6 +0,0 @@ -Download http://127.0.0.1:4545/xTypeScriptTypes.js -Download http://127.0.0.1:4545/xTypeScriptTypes.d.ts -Defined in http://127.0.0.1:4545/xTypeScriptTypes.d.ts:1:14 - -const foo: "foo" - diff --git a/cli/tests/testdata/doc/types_header.ts b/cli/tests/testdata/doc/types_header.ts deleted file mode 100644 index b64c8d000..000000000 --- a/cli/tests/testdata/doc/types_header.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "http://127.0.0.1:4545/xTypeScriptTypes.js"; diff --git a/cli/tests/testdata/doc/types_hint.out b/cli/tests/testdata/doc/types_hint.out deleted file mode 100644 index bfd5191a1..000000000 --- a/cli/tests/testdata/doc/types_hint.out +++ /dev/null @@ -1,5 +0,0 @@ -Defined in [WILDCARD]/type_definitions/foo.d.ts:2:14 - -const foo: string - An exported value. - diff --git a/cli/tests/testdata/doc/types_hint.ts b/cli/tests/testdata/doc/types_hint.ts deleted file mode 100644 index bacea46db..000000000 --- a/cli/tests/testdata/doc/types_hint.ts +++ /dev/null @@ -1,2 +0,0 @@ -// @deno-types="../type_definitions/foo.d.ts" -export * from "../type_definitions/foo.js"; diff --git a/cli/tests/testdata/doc/types_ref.js b/cli/tests/testdata/doc/types_ref.js deleted file mode 100644 index 03d8b5570..000000000 --- a/cli/tests/testdata/doc/types_ref.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export const foo = "foo"; diff --git a/cli/tests/testdata/doc/types_ref.out b/cli/tests/testdata/doc/types_ref.out deleted file mode 100644 index bfd5191a1..000000000 --- a/cli/tests/testdata/doc/types_ref.out +++ /dev/null @@ -1,5 +0,0 @@ -Defined in [WILDCARD]/type_definitions/foo.d.ts:2:14 - -const foo: string - An exported value. - diff --git a/cli/tests/testdata/doc/use_import_map.js b/cli/tests/testdata/doc/use_import_map.js deleted file mode 100644 index 672a7a7bd..000000000 --- a/cli/tests/testdata/doc/use_import_map.js +++ /dev/null @@ -1 +0,0 @@ -export { fun } from "rex/fun.js"; diff --git a/cli/tests/testdata/doc/use_import_map.out b/cli/tests/testdata/doc/use_import_map.out deleted file mode 100644 index 9509d5bfe..000000000 --- a/cli/tests/testdata/doc/use_import_map.out +++ /dev/null @@ -1,5 +0,0 @@ -Defined in [WILDCARD]/doc/module/fun.js:2:1 - -function fun(_a, _b): void - This is some documentation - -- cgit v1.2.3