summaryrefslogtreecommitdiff
path: root/std/fs/write_json_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-04-28 12:33:09 +0200
committerGitHub <noreply@github.com>2020-04-28 12:33:09 +0200
commit8feb30e3258ed9690eb850e3ca22842b260a0403 (patch)
tree6805bfe3df675c2c7f6a379093061c6b73d8365a /std/fs/write_json_test.ts
parentb508e845671de9351c3f51755647371d76128d29 (diff)
BREAKING: remove overload of Deno.test() (#4951)
This commit removes overload of Deno.test() that accepted named function.
Diffstat (limited to 'std/fs/write_json_test.ts')
-rw-r--r--std/fs/write_json_test.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/std/fs/write_json_test.ts b/std/fs/write_json_test.ts
index 335d35bfe..45d27c4f1 100644
--- a/std/fs/write_json_test.ts
+++ b/std/fs/write_json_test.ts
@@ -9,7 +9,7 @@ import { writeJson, writeJsonSync } from "./write_json.ts";
const testdataDir = path.resolve("fs", "testdata");
-Deno.test(async function writeJsonIfNotExists(): Promise<void> {
+Deno.test("writeJsonIfNotExists", async function (): Promise<void> {
const notExistsJsonFile = path.join(testdataDir, "file_not_exists.json");
await assertThrowsAsync(
@@ -28,7 +28,7 @@ Deno.test(async function writeJsonIfNotExists(): Promise<void> {
assertEquals(new TextDecoder().decode(content), `{"a":"1"}`);
});
-Deno.test(async function writeJsonIfExists(): Promise<void> {
+Deno.test("writeJsonIfExists", async function (): Promise<void> {
const existsJsonFile = path.join(testdataDir, "file_write_exists.json");
await Deno.writeFile(existsJsonFile, new Uint8Array());
@@ -49,7 +49,7 @@ Deno.test(async function writeJsonIfExists(): Promise<void> {
assertEquals(new TextDecoder().decode(content), `{"a":"1"}`);
});
-Deno.test(async function writeJsonIfExistsAnInvalidJson(): Promise<void> {
+Deno.test("writeJsonIfExistsAnInvalidJson", async function (): Promise<void> {
const existsInvalidJsonFile = path.join(
testdataDir,
"file_write_invalid.json"
@@ -74,7 +74,7 @@ Deno.test(async function writeJsonIfExistsAnInvalidJson(): Promise<void> {
assertEquals(new TextDecoder().decode(content), `{"a":"1"}`);
});
-Deno.test(async function writeJsonWithSpaces(): Promise<void> {
+Deno.test("writeJsonWithSpaces", async function (): Promise<void> {
const existsJsonFile = path.join(testdataDir, "file_write_spaces.json");
const invalidJsonContent = new TextEncoder().encode();
@@ -96,7 +96,7 @@ Deno.test(async function writeJsonWithSpaces(): Promise<void> {
assertEquals(new TextDecoder().decode(content), `{\n "a": "1"\n}`);
});
-Deno.test(async function writeJsonWithReplacer(): Promise<void> {
+Deno.test("writeJsonWithReplacer", async function (): Promise<void> {
const existsJsonFile = path.join(testdataDir, "file_write_replacer.json");
const invalidJsonContent = new TextEncoder().encode();
@@ -124,7 +124,7 @@ Deno.test(async function writeJsonWithReplacer(): Promise<void> {
assertEquals(new TextDecoder().decode(content), `{"a":"1"}`);
});
-Deno.test(function writeJsonSyncIfNotExists(): void {
+Deno.test("writeJsonSyncIfNotExists", function (): void {
const notExistsJsonFile = path.join(testdataDir, "file_not_exists_sync.json");
assertThrows(
@@ -143,7 +143,7 @@ Deno.test(function writeJsonSyncIfNotExists(): void {
assertEquals(new TextDecoder().decode(content), `{"a":"1"}`);
});
-Deno.test(function writeJsonSyncIfExists(): void {
+Deno.test("writeJsonSyncIfExists", function (): void {
const existsJsonFile = path.join(testdataDir, "file_write_exists_sync.json");
Deno.writeFileSync(existsJsonFile, new Uint8Array());
@@ -164,7 +164,7 @@ Deno.test(function writeJsonSyncIfExists(): void {
assertEquals(new TextDecoder().decode(content), `{"a":"1"}`);
});
-Deno.test(function writeJsonSyncIfExistsAnInvalidJson(): void {
+Deno.test("writeJsonSyncIfExistsAnInvalidJson", function (): void {
const existsInvalidJsonFile = path.join(
testdataDir,
"file_write_invalid_sync.json"
@@ -189,7 +189,7 @@ Deno.test(function writeJsonSyncIfExistsAnInvalidJson(): void {
assertEquals(new TextDecoder().decode(content), `{"a":"1"}`);
});
-Deno.test(function writeJsonWithSpaces(): void {
+Deno.test("writeJsonWithSpaces", function (): void {
const existsJsonFile = path.join(testdataDir, "file_write_spaces_sync.json");
const invalidJsonContent = new TextEncoder().encode();
@@ -211,7 +211,7 @@ Deno.test(function writeJsonWithSpaces(): void {
assertEquals(new TextDecoder().decode(content), `{\n "a": "1"\n}`);
});
-Deno.test(function writeJsonWithReplacer(): void {
+Deno.test("writeJsonWithReplacer", function (): void {
const existsJsonFile = path.join(
testdataDir,
"file_write_replacer_sync.json"