summaryrefslogtreecommitdiff
path: root/cli/tests/test
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/test')
-rw-r--r--cli/tests/test/doc.out5
-rw-r--r--cli/tests/test/doc.ts10
2 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/test/doc.out b/cli/tests/test/doc.out
new file mode 100644
index 000000000..0f3d02aa3
--- /dev/null
+++ b/cli/tests/test/doc.out
@@ -0,0 +1,5 @@
+Check [WILDCARD]/doc.ts:2-7
+error: TS2367 [ERROR]: This condition will always return 'false' since the types 'string' and 'number' have no overlap.
+console.assert(example() == 42);
+ ~~~~~~~~~~~~~~~
+ at [WILDCARD]/doc.ts:2-7.ts:3:16
diff --git a/cli/tests/test/doc.ts b/cli/tests/test/doc.ts
new file mode 100644
index 000000000..9298393eb
--- /dev/null
+++ b/cli/tests/test/doc.ts
@@ -0,0 +1,10 @@
+/**
+ * ```
+ * import { example } from "./doc.ts";
+ *
+ * console.assert(example() == 42);
+ * ```
+ */
+export function example(): string {
+ return "example";
+}