summaryrefslogtreecommitdiff
path: root/cli/tests/doc
diff options
context:
space:
mode:
authorValentin Anger <syrupthinker@gryphno.de>2020-10-12 01:05:46 +0200
committerGitHub <noreply@github.com>2020-10-12 10:05:46 +1100
commitfede13f2eb64f648e6c39aa01e2e0ede4e5be25e (patch)
tree98c81ab03833c1cc9d9d1f163dce4a8ff5c19b06 /cli/tests/doc
parent5f3028af13c25fb3af8f36d3d5913ef0688e5ce7 (diff)
feat(cli): support importmap flag with deno doc subcommand (#7821)
Fixes #7783
Diffstat (limited to 'cli/tests/doc')
-rw-r--r--cli/tests/doc/importmap.json5
-rw-r--r--cli/tests/doc/module/fun.js2
-rw-r--r--cli/tests/doc/use_importmap.js1
-rw-r--r--cli/tests/doc/use_importmap.out5
4 files changed, 13 insertions, 0 deletions
diff --git a/cli/tests/doc/importmap.json b/cli/tests/doc/importmap.json
new file mode 100644
index 000000000..244a30296
--- /dev/null
+++ b/cli/tests/doc/importmap.json
@@ -0,0 +1,5 @@
+{
+ "imports": {
+ "rex/": "./module/"
+ }
+}
diff --git a/cli/tests/doc/module/fun.js b/cli/tests/doc/module/fun.js
new file mode 100644
index 000000000..28901d945
--- /dev/null
+++ b/cli/tests/doc/module/fun.js
@@ -0,0 +1,2 @@
+/** This is some documentation */
+export function fun(_a, _b) {}
diff --git a/cli/tests/doc/use_importmap.js b/cli/tests/doc/use_importmap.js
new file mode 100644
index 000000000..672a7a7bd
--- /dev/null
+++ b/cli/tests/doc/use_importmap.js
@@ -0,0 +1 @@
+export { fun } from "rex/fun.js";
diff --git a/cli/tests/doc/use_importmap.out b/cli/tests/doc/use_importmap.out
new file mode 100644
index 000000000..0b27ccf18
--- /dev/null
+++ b/cli/tests/doc/use_importmap.out
@@ -0,0 +1,5 @@
+Defined in [WILDCARD]/doc/module/fun.js:2:0
+
+function fun(_a, _b)
+ This is some documentation
+