summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration_tests.rs14
-rw-r--r--cli/tests/lint/expected_from_stdin.out2
-rw-r--r--cli/tests/lint/expected_from_stdin_json.out16
3 files changed, 32 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index c0dcdb606..bf532e404 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2253,6 +2253,20 @@ itest!(deno_lint_glob {
exit_code: 1,
});
+itest!(deno_lint_from_stdin {
+ args: "lint --unstable -",
+ input: Some("let a: any;"),
+ output: "lint/expected_from_stdin.out",
+ exit_code: 1,
+});
+
+itest!(deno_lint_from_stdin_json {
+ args: "lint --unstable --json -",
+ input: Some("let a: any;"),
+ output: "lint/expected_from_stdin_json.out",
+ exit_code: 1,
+});
+
itest!(deno_doc_builtin {
args: "doc",
output: "deno_doc_builtin.out",
diff --git a/cli/tests/lint/expected_from_stdin.out b/cli/tests/lint/expected_from_stdin.out
new file mode 100644
index 000000000..02b9d917c
--- /dev/null
+++ b/cli/tests/lint/expected_from_stdin.out
@@ -0,0 +1,2 @@
+[WILDCARD]
+Found 1 problem
diff --git a/cli/tests/lint/expected_from_stdin_json.out b/cli/tests/lint/expected_from_stdin_json.out
new file mode 100644
index 000000000..bec566841
--- /dev/null
+++ b/cli/tests/lint/expected_from_stdin_json.out
@@ -0,0 +1,16 @@
+{
+ "diagnostics": [
+ {
+ "location": {
+ "line": 1,
+ "col": 7
+ },
+ "filename": "_stdin.ts",
+ "message": "`any` type is not allowed",
+ "code": "no-explicit-any",
+ "line_src": "let a: any;",
+ "snippet_length": 3
+ }
+ ],
+ "errors": []
+}