summaryrefslogtreecommitdiff
path: root/cli/tests/unit/chown_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/chown_test.ts')
-rw-r--r--cli/tests/unit/chown_test.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/cli/tests/unit/chown_test.ts b/cli/tests/unit/chown_test.ts
index 2fac679ce..a8d264a6c 100644
--- a/cli/tests/unit/chown_test.ts
+++ b/cli/tests/unit/chown_test.ts
@@ -31,7 +31,7 @@ async function getUidAndGid(): Promise<{ uid: number; gid: number }> {
unitTest(
{ ignore: Deno.build.os == "windows" },
- async function chownNoWritePermission(): Promise<void> {
+ async function chownNoWritePermission() {
const filePath = "chown_test_file.txt";
await assertThrowsAsync(async () => {
await Deno.chown(filePath, 1000, 1000);
@@ -41,7 +41,7 @@ unitTest(
unitTest(
{ perms: { run: true, write: true }, ignore: Deno.build.os == "windows" },
- async function chownSyncFileNotExist(): Promise<void> {
+ async function chownSyncFileNotExist() {
const { uid, gid } = await getUidAndGid();
const filePath = Deno.makeTempDirSync() + "/chown_test_file.txt";
@@ -53,7 +53,7 @@ unitTest(
unitTest(
{ perms: { run: true, write: true }, ignore: Deno.build.os == "windows" },
- async function chownFileNotExist(): Promise<void> {
+ async function chownFileNotExist() {
const { uid, gid } = await getUidAndGid();
const filePath = (await Deno.makeTempDir()) + "/chown_test_file.txt";
@@ -65,7 +65,7 @@ unitTest(
unitTest(
{ perms: { write: true }, ignore: Deno.build.os == "windows" },
- function chownSyncPermissionDenied(): void {
+ function chownSyncPermissionDenied() {
const dirPath = Deno.makeTempDirSync();
const filePath = dirPath + "/chown_test_file.txt";
Deno.writeTextFileSync(filePath, "Hello");
@@ -80,7 +80,7 @@ unitTest(
unitTest(
{ perms: { write: true }, ignore: Deno.build.os == "windows" },
- async function chownPermissionDenied(): Promise<void> {
+ async function chownPermissionDenied() {
const dirPath = await Deno.makeTempDir();
const filePath = dirPath + "/chown_test_file.txt";
await Deno.writeTextFile(filePath, "Hello");
@@ -95,7 +95,7 @@ unitTest(
unitTest(
{ perms: { run: true, write: true }, ignore: Deno.build.os == "windows" },
- async function chownSyncSucceed(): Promise<void> {
+ async function chownSyncSucceed() {
// TODO(bartlomieju): when a file's owner is actually being changed,
// chown only succeeds if run under priviledged user (root)
// The test script has no such privilege, so need to find a better way to test this case
@@ -115,7 +115,7 @@ unitTest(
unitTest(
{ perms: { run: true, write: true }, ignore: Deno.build.os == "windows" },
- async function chownSyncWithUrl(): Promise<void> {
+ async function chownSyncWithUrl() {
const { uid, gid } = await getUidAndGid();
const dirPath = Deno.makeTempDirSync();
const fileUrl = new URL(`file://${dirPath}/chown_test_file.txt`);
@@ -127,7 +127,7 @@ unitTest(
unitTest(
{ perms: { run: true, write: true }, ignore: Deno.build.os == "windows" },
- async function chownSucceed(): Promise<void> {
+ async function chownSucceed() {
const { uid, gid } = await getUidAndGid();
const dirPath = await Deno.makeTempDir();
const filePath = dirPath + "/chown_test_file.txt";
@@ -139,7 +139,7 @@ unitTest(
unitTest(
{ perms: { run: true, write: true }, ignore: Deno.build.os == "windows" },
- async function chownUidOnly(): Promise<void> {
+ async function chownUidOnly() {
const { uid } = await getUidAndGid();
const dirPath = await Deno.makeTempDir();
const filePath = dirPath + "/chown_test_file.txt";
@@ -151,7 +151,7 @@ unitTest(
unitTest(
{ perms: { run: true, write: true }, ignore: Deno.build.os == "windows" },
- async function chownWithUrl(): Promise<void> {
+ async function chownWithUrl() {
// TODO(bartlomieju): same as chownSyncSucceed
const { uid, gid } = await getUidAndGid();