summaryrefslogtreecommitdiff
path: root/cli/tests/unit/tty_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/tty_test.ts')
-rw-r--r--cli/tests/unit/tty_test.ts32
1 files changed, 0 insertions, 32 deletions
diff --git a/cli/tests/unit/tty_test.ts b/cli/tests/unit/tty_test.ts
deleted file mode 100644
index 8ca9a5d5b..000000000
--- a/cli/tests/unit/tty_test.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-import { assert } from "./test_util.ts";
-
-// Note tests for Deno.stdin.setRaw is in integration tests.
-
-Deno.test(function consoleSize() {
- if (!Deno.stdout.isTerminal()) {
- return;
- }
- const result = Deno.consoleSize();
- assert(typeof result.columns !== "undefined");
- assert(typeof result.rows !== "undefined");
-});
-
-Deno.test({ permissions: { read: true } }, function isatty() {
- // CI not under TTY, so cannot test stdin/stdout/stderr.
- const f = Deno.openSync("cli/tests/testdata/assets/hello.txt");
- assert(!Deno.isatty(f.rid));
- f.close();
-});
-
-Deno.test(function isattyError() {
- let caught = false;
- try {
- // Absurdly large rid.
- Deno.isatty(0x7fffffff);
- } catch (e) {
- caught = true;
- assert(e instanceof Deno.errors.BadResource);
- }
- assert(caught);
-});