mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
refactor(cli/tests): remove unnecessary void return types (#11577)
This commit is contained in:
parent
299c7cfe54
commit
3f0cf9619f
121 changed files with 1095 additions and 1177 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue