diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/doc_tests.rs | 17 | ||||
-rw-r--r-- | cli/tests/testdata/doc/lint_success.out | 1 | ||||
-rw-r--r-- | cli/tests/testdata/doc/lint_success.ts | 5 | ||||
-rw-r--r-- | cli/tests/testdata/doc/lint_success_html.out | 1 | ||||
-rw-r--r-- | cli/tests/testdata/doc/lint_success_json.out | 48 | ||||
-rw-r--r-- | cli/tests/testdata/doc/referenced_private_types_fixed.out | 17 |
6 files changed, 73 insertions, 16 deletions
diff --git a/cli/tests/integration/doc_tests.rs b/cli/tests/integration/doc_tests.rs index f5ac44a02..7a3f08f48 100644 --- a/cli/tests/integration/doc_tests.rs +++ b/cli/tests/integration/doc_tests.rs @@ -70,6 +70,23 @@ itest!(deno_doc_html_lint_referenced_private_types_fixed { output: "doc/referenced_private_types_lint.out", }); +itest!(deno_doc_lint_success { + args: "doc --lint doc/lint_success.ts", + output: "doc/lint_success.out", +}); + +itest!(deno_doc_lint_json_success { + args: "doc --lint --json doc/lint_success.ts", + output: "doc/lint_success_json.out", +}); + +itest!(deno_doc_lint_html_success { + args: "doc --lint --html --name=Library lint_success.ts", + copy_temp_dir: Some("doc"), + cwd: Some("doc"), + output: "doc/lint_success_html.out", +}); + itest!(_060_deno_doc_displays_all_overloads_in_details_view { args: "doc --filter NS.test doc/060_deno_doc_displays_all_overloads_in_details_view.ts", diff --git a/cli/tests/testdata/doc/lint_success.out b/cli/tests/testdata/doc/lint_success.out new file mode 100644 index 000000000..c05ac45a1 --- /dev/null +++ b/cli/tests/testdata/doc/lint_success.out @@ -0,0 +1 @@ +Checked 1 file diff --git a/cli/tests/testdata/doc/lint_success.ts b/cli/tests/testdata/doc/lint_success.ts new file mode 100644 index 000000000..42c44b2d7 --- /dev/null +++ b/cli/tests/testdata/doc/lint_success.ts @@ -0,0 +1,5 @@ +/** 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 new file mode 100644 index 000000000..8c4c2d187 --- /dev/null +++ b/cli/tests/testdata/doc/lint_success_html.out @@ -0,0 +1 @@ +Written 7 files to "./docs/" diff --git a/cli/tests/testdata/doc/lint_success_json.out b/cli/tests/testdata/doc/lint_success_json.out new file mode 100644 index 000000000..bf06a15cd --- /dev/null +++ b/cli/tests/testdata/doc/lint_success_json.out @@ -0,0 +1,48 @@ +[ + { + "kind": "class", + "name": "Test", + "location": { + "filename": "file:///[WILDCARD]/lint_success.ts", + "line": 2, + "col": 0 + }, + "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 + } + } + ], + "indexSignatures": [], + "methods": [], + "extends": null, + "implements": [], + "typeParams": [], + "superTypeParams": [] + } + } +] diff --git a/cli/tests/testdata/doc/referenced_private_types_fixed.out b/cli/tests/testdata/doc/referenced_private_types_fixed.out index 4621c6371..c05ac45a1 100644 --- a/cli/tests/testdata/doc/referenced_private_types_fixed.out +++ b/cli/tests/testdata/doc/referenced_private_types_fixed.out @@ -1,16 +1 @@ -Defined in file:///[WILDCARD]/referenced_private_types_fixed.ts:8:1 - -class MyClass - Doc comment - - prop: MyInterface - Doc comment - -Defined in file:///[WILDCARD]/referenced_private_types_fixed.ts:2:1 - -interface MyInterface - Doc comment - - prop?: string - Doc comment - +Checked 1 file |