summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/error_008_checkjs.js6
-rw-r--r--tests/error_008_checkjs.js.out10
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/error_008_checkjs.js b/tests/error_008_checkjs.js
new file mode 100644
index 000000000..08d4873c7
--- /dev/null
+++ b/tests/error_008_checkjs.js
@@ -0,0 +1,6 @@
+// console.log intentionally misspelled to trigger a type error
+consol.log("hello world!");
+
+// the following error should be ignored and not output to the console
+// @ts-ignore
+const foo = new Foo();
diff --git a/tests/error_008_checkjs.js.out b/tests/error_008_checkjs.js.out
new file mode 100644
index 000000000..9220efaf1
--- /dev/null
+++ b/tests/error_008_checkjs.js.out
@@ -0,0 +1,10 @@
+[WILDCARD]/tests/error_008_checkjs.jsILDCARD] - error TS2552: Cannot find name 'consol'. Did you mean 'console'?
+
+ILDCARD] consol.log("hello world!");
+[WILDCARD]~~~~~~
+
+ $asset$/lib.deno_runtime.d.tsILDCARD]
+[WILDCARD]declare const console: console_.Console;
+[WILDCARD]~~~~~~~
+[WILDCARD]'console' is declared here.
+