refactor(cli/tests): remove unnecessary void return types (#11577)

This commit is contained in:
Leo K 2021-08-05 13:08:58 +02:00 committed by GitHub
parent 299c7cfe54
commit 3f0cf9619f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
121 changed files with 1095 additions and 1177 deletions

View file

@ -3,7 +3,7 @@ import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts";
unitTest(
{ perms: { read: true, write: true } },
function linkSyncSuccess(): void {
function linkSyncSuccess() {
const testDir = Deno.makeTempDirSync();
const oldData = "Hardlink";
const oldName = testDir + "/oldname";
@ -42,7 +42,7 @@ unitTest(
unitTest(
{ perms: { read: true, write: true } },
function linkSyncExists(): void {
function linkSyncExists() {
const testDir = Deno.makeTempDirSync();
const oldName = testDir + "/oldname";
const newName = testDir + "/newname";
@ -58,7 +58,7 @@ unitTest(
unitTest(
{ perms: { read: true, write: true } },
function linkSyncNotFound(): void {
function linkSyncNotFound() {
const testDir = Deno.makeTempDirSync();
const oldName = testDir + "/oldname";
const newName = testDir + "/newname";
@ -71,7 +71,7 @@ unitTest(
unitTest(
{ perms: { read: false, write: true } },
function linkSyncReadPerm(): void {
function linkSyncReadPerm() {
assertThrows(() => {
Deno.linkSync("oldbaddir", "newbaddir");
}, Deno.errors.PermissionDenied);
@ -80,7 +80,7 @@ unitTest(
unitTest(
{ perms: { read: true, write: false } },
function linkSyncWritePerm(): void {
function linkSyncWritePerm() {
assertThrows(() => {
Deno.linkSync("oldbaddir", "newbaddir");
}, Deno.errors.PermissionDenied);
@ -89,7 +89,7 @@ unitTest(
unitTest(
{ perms: { read: true, write: true } },
async function linkSuccess(): Promise<void> {
async function linkSuccess() {
const testDir = Deno.makeTempDirSync();
const oldData = "Hardlink";
const oldName = testDir + "/oldname";