summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/lint/bom/__test__.jsonc5
-rw-r--r--tests/specs/lint/bom/mod.out12
-rw-r--r--tests/specs/lint/bom/mod.ts4
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/specs/lint/bom/__test__.jsonc b/tests/specs/lint/bom/__test__.jsonc
new file mode 100644
index 000000000..f2ea579c4
--- /dev/null
+++ b/tests/specs/lint/bom/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "lint mod.ts",
+ "exitCode": 1,
+ "output": "mod.out"
+}
diff --git a/tests/specs/lint/bom/mod.out b/tests/specs/lint/bom/mod.out
new file mode 100644
index 000000000..eea1e531d
--- /dev/null
+++ b/tests/specs/lint/bom/mod.out
@@ -0,0 +1,12 @@
+error[no-unused-vars]: `t` is never used
+ --> [WILDLINE]
+ |
+4 | const t = 5;
+ | ^
+ = hint: If this is intentional, prefix it with an underscore like `_t`
+
+ docs: https://lint.deno.land/rules/no-unused-vars
+
+
+Found 1 problem
+Checked 1 file
diff --git a/tests/specs/lint/bom/mod.ts b/tests/specs/lint/bom/mod.ts
new file mode 100644
index 000000000..c2374d45d
--- /dev/null
+++ b/tests/specs/lint/bom/mod.ts
@@ -0,0 +1,4 @@
+// this file is saved as UTF8 with BOM
+console.log("Hello, world!");
+
+const t = 5;