summaryrefslogtreecommitdiff
path: root/cli/tests/unit/tty_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-11-23 17:45:18 +0100
committerGitHub <noreply@github.com>2021-11-23 17:45:18 +0100
commitbedb2adfb065c1b0d3bcb773fbeff91230402b6b (patch)
treeb4d90c36f2409f7f9b6247b74e9c111a38befcdf /cli/tests/unit/tty_test.ts
parent51e3db956a5927229e3f46f4eaaf317e935f8f17 (diff)
refactor: remove "unitTest" wrapper from cli/tests/unit (#12750)
Diffstat (limited to 'cli/tests/unit/tty_test.ts')
-rw-r--r--cli/tests/unit/tty_test.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/tests/unit/tty_test.ts b/cli/tests/unit/tty_test.ts
index 2f13dd739..dd492aa36 100644
--- a/cli/tests/unit/tty_test.ts
+++ b/cli/tests/unit/tty_test.ts
@@ -1,9 +1,9 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-import { assert, assertThrows, unitTest } from "./test_util.ts";
+import { assert, assertThrows } from "./test_util.ts";
// Note tests for Deno.setRaw is in integration tests.
-unitTest({ permissions: { read: true } }, function consoleSizeFile() {
+Deno.test({ permissions: { read: true } }, function consoleSizeFile() {
const file = Deno.openSync("cli/tests/testdata/hello.txt");
assertThrows(() => {
Deno.consoleSize(file.rid);
@@ -11,21 +11,21 @@ unitTest({ permissions: { read: true } }, function consoleSizeFile() {
file.close();
});
-unitTest(function consoleSizeError() {
+Deno.test(function consoleSizeError() {
assertThrows(() => {
// Absurdly large rid.
Deno.consoleSize(0x7fffffff);
}, Deno.errors.BadResource);
});
-unitTest({ permissions: { read: true } }, function isatty() {
+Deno.test({ permissions: { read: true } }, function isatty() {
// CI not under TTY, so cannot test stdin/stdout/stderr.
const f = Deno.openSync("cli/tests/testdata/hello.txt");
assert(!Deno.isatty(f.rid));
f.close();
});
-unitTest(function isattyError() {
+Deno.test(function isattyError() {
let caught = false;
try {
// Absurdly large rid.