summaryrefslogtreecommitdiff
path: root/cli/js/tests/stat_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/tests/stat_test.ts')
-rw-r--r--cli/js/tests/stat_test.ts28
1 files changed, 8 insertions, 20 deletions
diff --git a/cli/js/tests/stat_test.ts b/cli/js/tests/stat_test.ts
index e51204b6e..78582900e 100644
--- a/cli/js/tests/stat_test.ts
+++ b/cli/js/tests/stat_test.ts
@@ -3,9 +3,7 @@ import { unitTest, assert, assertEquals } from "./test_util.ts";
// TODO Add tests for modified, accessed, and created fields once there is a way
// to create temp files.
-unitTest({ perms: { read: true } }, async function statSyncSuccess(): Promise<
- void
-> {
+unitTest({ perms: { read: true } }, function statSyncSuccess(): void {
const packageInfo = Deno.statSync("README.md");
assert(packageInfo.isFile());
assert(!packageInfo.isSymlink());
@@ -19,9 +17,7 @@ unitTest({ perms: { read: true } }, async function statSyncSuccess(): Promise<
assert(!testsInfo.isSymlink());
});
-unitTest({ perms: { read: false } }, async function statSyncPerm(): Promise<
- void
-> {
+unitTest({ perms: { read: false } }, function statSyncPerm(): void {
let caughtError = false;
try {
Deno.statSync("README.md");
@@ -32,9 +28,7 @@ unitTest({ perms: { read: false } }, async function statSyncPerm(): Promise<
assert(caughtError);
});
-unitTest({ perms: { read: true } }, async function statSyncNotFound(): Promise<
- void
-> {
+unitTest({ perms: { read: true } }, function statSyncNotFound(): void {
let caughtError = false;
let badInfo;
@@ -49,9 +43,7 @@ unitTest({ perms: { read: true } }, async function statSyncNotFound(): Promise<
assertEquals(badInfo, undefined);
});
-unitTest({ perms: { read: true } }, async function lstatSyncSuccess(): Promise<
- void
-> {
+unitTest({ perms: { read: true } }, function lstatSyncSuccess(): void {
const packageInfo = Deno.lstatSync("README.md");
assert(packageInfo.isFile());
assert(!packageInfo.isSymlink());
@@ -65,9 +57,7 @@ unitTest({ perms: { read: true } }, async function lstatSyncSuccess(): Promise<
assert(!coreInfo.isSymlink());
});
-unitTest({ perms: { read: false } }, async function lstatSyncPerm(): Promise<
- void
-> {
+unitTest({ perms: { read: false } }, function lstatSyncPerm(): void {
let caughtError = false;
try {
Deno.lstatSync("README.md");
@@ -78,9 +68,7 @@ unitTest({ perms: { read: false } }, async function lstatSyncPerm(): Promise<
assert(caughtError);
});
-unitTest({ perms: { read: true } }, async function lstatSyncNotFound(): Promise<
- void
-> {
+unitTest({ perms: { read: true } }, function lstatSyncNotFound(): void {
let caughtError = false;
let badInfo;
@@ -185,7 +173,7 @@ unitTest({ perms: { read: true } }, async function lstatNotFound(): Promise<
unitTest(
{ ignore: Deno.build.os !== "win", perms: { read: true, write: true } },
- async function statNoUnixFields(): Promise<void> {
+ function statNoUnixFields(): void {
const enc = new TextEncoder();
const data = enc.encode("Hello");
const tempDir = Deno.makeTempDirSync();
@@ -206,7 +194,7 @@ unitTest(
unitTest(
{ ignore: Deno.build.os === "win", perms: { read: true, write: true } },
- async function statUnixFields(): Promise<void> {
+ function statUnixFields(): void {
const enc = new TextEncoder();
const data = enc.encode("Hello");
const tempDir = Deno.makeTempDirSync();