summaryrefslogtreecommitdiff
path: root/std/node/_fs/_fs_appendFile_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/node/_fs/_fs_appendFile_test.ts')
-rw-r--r--std/node/_fs/_fs_appendFile_test.ts19
1 files changed, 9 insertions, 10 deletions
diff --git a/std/node/_fs/_fs_appendFile_test.ts b/std/node/_fs/_fs_appendFile_test.ts
index 402ac1c10..1286ff900 100644
--- a/std/node/_fs/_fs_appendFile_test.ts
+++ b/std/node/_fs/_fs_appendFile_test.ts
@@ -1,12 +1,11 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-const { test } = Deno;
import { assertEquals, assertThrows, fail } from "../../testing/asserts.ts";
import { appendFile, appendFileSync } from "./_fs_appendFile.ts";
import { fromFileUrl } from "../path.ts";
const decoder = new TextDecoder("utf-8");
-test({
+Deno.test({
name: "No callback Fn results in Error",
fn() {
assertThrows(
@@ -19,7 +18,7 @@ test({
},
});
-test({
+Deno.test({
name: "Unsupported encoding results in error()",
fn() {
assertThrows(
@@ -57,7 +56,7 @@ test({
},
});
-test({
+Deno.test({
name: "Async: Data is written to passed in rid",
async fn() {
const tempFile: string = await Deno.makeTempFile();
@@ -86,7 +85,7 @@ test({
},
});
-test({
+Deno.test({
name: "Async: Data is written to passed in file path",
async fn() {
const openResourcesBeforeAppend: Deno.ResourceMap = Deno.resources();
@@ -110,7 +109,7 @@ test({
},
});
-test({
+Deno.test({
name: "Async: Data is written to passed in URL",
async fn() {
const openResourcesBeforeAppend: Deno.ResourceMap = Deno.resources();
@@ -135,7 +134,7 @@ test({
},
});
-test({
+Deno.test({
name:
"Async: Callback is made with error if attempting to append data to an existing file with 'ax' flag",
async fn() {
@@ -159,7 +158,7 @@ test({
},
});
-test({
+Deno.test({
name: "Sync: Data is written to passed in rid",
fn() {
const tempFile: string = Deno.makeTempFileSync();
@@ -176,7 +175,7 @@ test({
},
});
-test({
+Deno.test({
name: "Sync: Data is written to passed in file path",
fn() {
const openResourcesBeforeAppend: Deno.ResourceMap = Deno.resources();
@@ -188,7 +187,7 @@ test({
},
});
-test({
+Deno.test({
name:
"Sync: error thrown if attempting to append data to an existing file with 'ax' flag",
fn() {