From 9dfebbc9496138efbeedc431068f41662c780f3e Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 21 Apr 2019 16:40:10 -0400 Subject: Fix eslint warnings (#2151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk Co-authored-by: LE GOFF Vincent --- js/mkdir_test.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'js/mkdir_test.ts') diff --git a/js/mkdir_test.ts b/js/mkdir_test.ts index 2d4f951aa..9e97265f0 100644 --- a/js/mkdir_test.ts +++ b/js/mkdir_test.ts @@ -1,14 +1,14 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import { testPerm, assert, assertEquals } from "./test_util.ts"; -testPerm({ read: true, write: true }, function mkdirSyncSuccess() { +testPerm({ read: true, write: true }, function mkdirSyncSuccess(): void { const path = Deno.makeTempDirSync() + "/dir"; Deno.mkdirSync(path); const pathInfo = Deno.statSync(path); assert(pathInfo.isDirectory()); }); -testPerm({ read: true, write: true }, function mkdirSyncMode() { +testPerm({ read: true, write: true }, function mkdirSyncMode(): void { const path = Deno.makeTempDirSync() + "/dir"; Deno.mkdirSync(path, false, 0o755); // no perm for x const pathInfo = Deno.statSync(path); @@ -18,7 +18,7 @@ testPerm({ read: true, write: true }, function mkdirSyncMode() { } }); -testPerm({ write: false }, function mkdirSyncPerm() { +testPerm({ write: false }, function mkdirSyncPerm(): void { let err; try { Deno.mkdirSync("/baddir"); @@ -29,14 +29,16 @@ testPerm({ write: false }, function mkdirSyncPerm() { assertEquals(err.name, "PermissionDenied"); }); -testPerm({ read: true, write: true }, async function mkdirSuccess() { +testPerm({ read: true, write: true }, async function mkdirSuccess(): Promise< + void +> { const path = Deno.makeTempDirSync() + "/dir"; await Deno.mkdir(path); const pathInfo = Deno.statSync(path); assert(pathInfo.isDirectory()); }); -testPerm({ write: true }, function mkdirErrIfExists() { +testPerm({ write: true }, function mkdirErrIfExists(): void { let err; try { Deno.mkdirSync("."); @@ -47,14 +49,16 @@ testPerm({ write: true }, function mkdirErrIfExists() { assertEquals(err.name, "AlreadyExists"); }); -testPerm({ read: true, write: true }, function mkdirSyncRecursive() { +testPerm({ read: true, write: true }, function mkdirSyncRecursive(): void { const path = Deno.makeTempDirSync() + "/nested/directory"; Deno.mkdirSync(path, true); const pathInfo = Deno.statSync(path); assert(pathInfo.isDirectory()); }); -testPerm({ read: true, write: true }, async function mkdirRecursive() { +testPerm({ read: true, write: true }, async function mkdirRecursive(): Promise< + void +> { const path = Deno.makeTempDirSync() + "/nested/directory"; await Deno.mkdir(path, true); const pathInfo = Deno.statSync(path); -- cgit v1.2.3