diff options
author | Liam Murphy <43807659+Liamolucko@users.noreply.github.com> | 2021-02-26 02:24:05 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 16:24:05 +0100 |
commit | cdae4423c27443e0085d59f45eda1c978f186a1c (patch) | |
tree | 74107cebfe5a49a8021ef3fc02c60b30548163be /cli/tests/integration_tests.rs | |
parent | 687ff2ab14d6a735aa5bf0ec57ef00cfe0c04e4b (diff) |
feat(cli/doc): use type definitions "deno doc" if available (#8459)
This commit adds support for type definitions in "deno doc";
with this change "deno doc" is able to leverage the same directives
as TS compiler.
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r-- | cli/tests/integration_tests.rs | 54 |
1 files changed, 40 insertions, 14 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 497028cd1..8b8d6354b 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -3669,20 +3669,10 @@ console.log("finish"); exit_code: 0, }); - itest!(deno_doc_builtin { - args: "doc", - output: "deno_doc_builtin.out", - }); - - itest!(deno_doc { - args: "doc deno_doc.ts", - output: "deno_doc.out", - }); - - itest!(deno_doc_import_map { - args: - "doc --unstable --import-map=doc/import_map.json doc/use_import_map.js", - output: "doc/use_import_map.out", + itest!(deno_doc_types_header_direct { + args: "doc --reload http://127.0.0.1:4545/xTypeScriptTypes.js", + output: "doc/types_header.out", + http_server: true, }); itest!(import_data_url_error_stack { @@ -3945,6 +3935,42 @@ console.log("finish"); assert_eq!(output.stderr, b""); } + mod doc { + use super::*; + + itest!(deno_doc_builtin { + args: "doc", + output: "deno_doc_builtin.out", + }); + + itest!(deno_doc { + args: "doc deno_doc.ts", + output: "deno_doc.out", + }); + + itest!(deno_doc_import_map { + args: + "doc --unstable --import-map=doc/import_map.json doc/use_import_map.js", + output: "doc/use_import_map.out", + }); + + itest!(deno_doc_types_hint { + args: "doc doc/types_hint.ts", + output: "doc/types_hint.out", + }); + + itest!(deno_doc_types_ref { + args: "doc doc/types_ref.js", + output: "doc/types_ref.out", + }); + + itest!(deno_doc_types_header { + args: "doc --reload doc/types_header.ts", + output: "doc/types_header.out", + http_server: true, + }); + } + mod coverage { use super::*; |