From 8feb30e3258ed9690eb850e3ca22842b260a0403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 28 Apr 2020 12:33:09 +0200 Subject: BREAKING: remove overload of Deno.test() (#4951) This commit removes overload of Deno.test() that accepted named function. --- std/fs/write_json_test.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'std/fs/write_json_test.ts') 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 { +Deno.test("writeJsonIfNotExists", async function (): Promise { const notExistsJsonFile = path.join(testdataDir, "file_not_exists.json"); await assertThrowsAsync( @@ -28,7 +28,7 @@ Deno.test(async function writeJsonIfNotExists(): Promise { assertEquals(new TextDecoder().decode(content), `{"a":"1"}`); }); -Deno.test(async function writeJsonIfExists(): Promise { +Deno.test("writeJsonIfExists", async function (): Promise { 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 { assertEquals(new TextDecoder().decode(content), `{"a":"1"}`); }); -Deno.test(async function writeJsonIfExistsAnInvalidJson(): Promise { +Deno.test("writeJsonIfExistsAnInvalidJson", async function (): Promise { const existsInvalidJsonFile = path.join( testdataDir, "file_write_invalid.json" @@ -74,7 +74,7 @@ Deno.test(async function writeJsonIfExistsAnInvalidJson(): Promise { assertEquals(new TextDecoder().decode(content), `{"a":"1"}`); }); -Deno.test(async function writeJsonWithSpaces(): Promise { +Deno.test("writeJsonWithSpaces", async function (): Promise { const existsJsonFile = path.join(testdataDir, "file_write_spaces.json"); const invalidJsonContent = new TextEncoder().encode(); @@ -96,7 +96,7 @@ Deno.test(async function writeJsonWithSpaces(): Promise { assertEquals(new TextDecoder().decode(content), `{\n "a": "1"\n}`); }); -Deno.test(async function writeJsonWithReplacer(): Promise { +Deno.test("writeJsonWithReplacer", async function (): Promise { const existsJsonFile = path.join(testdataDir, "file_write_replacer.json"); const invalidJsonContent = new TextEncoder().encode(); @@ -124,7 +124,7 @@ Deno.test(async function writeJsonWithReplacer(): Promise { 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" -- cgit v1.2.3