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/log/handlers_test.ts | 6 +++--- std/log/logger_test.ts | 6 +++--- std/log/test.ts | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'std/log') diff --git a/std/log/handlers_test.ts b/std/log/handlers_test.ts index 561b5c04a..b69ef6eab 100644 --- a/std/log/handlers_test.ts +++ b/std/log/handlers_test.ts @@ -22,7 +22,7 @@ class TestHandler extends BaseHandler { } } -test(function simpleHandler(): void { +test("simpleHandler", function (): void { const cases = new Map([ [ LogLevels.DEBUG, @@ -68,7 +68,7 @@ test(function simpleHandler(): void { } }); -test(function testFormatterAsString(): void { +test("testFormatterAsString", function (): void { const handler = new TestHandler("DEBUG", { formatter: "test {levelName} {msg}", }); @@ -78,7 +78,7 @@ test(function testFormatterAsString(): void { assertEquals(handler.messages, ["test DEBUG Hello, world!"]); }); -test(function testFormatterAsFunction(): void { +test("testFormatterAsFunction", function (): void { const handler = new TestHandler("DEBUG", { formatter: (logRecord): string => `fn formatter ${logRecord.levelName} ${logRecord.msg}`, diff --git a/std/log/logger_test.ts b/std/log/logger_test.ts index 1c02dbb1a..44b0edd06 100644 --- a/std/log/logger_test.ts +++ b/std/log/logger_test.ts @@ -19,7 +19,7 @@ class TestHandler extends BaseHandler { } } -test(function simpleLogger(): void { +test("simpleLogger", function (): void { const handler = new TestHandler("DEBUG"); let logger = new Logger("DEBUG"); @@ -32,7 +32,7 @@ test(function simpleLogger(): void { assertEquals(logger.handlers, [handler]); }); -test(function customHandler(): void { +test("customHandler", function (): void { const handler = new TestHandler("DEBUG"); const logger = new Logger("DEBUG", [handler]); @@ -47,7 +47,7 @@ test(function customHandler(): void { assertEquals(handler.messages, ["DEBUG foo"]); }); -test(function logFunctions(): void { +test("logFunctions", function (): void { const doLog = (level: LevelName): TestHandler => { const handler = new TestHandler(level); const logger = new Logger(level, [handler]); diff --git a/std/log/test.ts b/std/log/test.ts index 47c75ba6e..2a51de6b5 100644 --- a/std/log/test.ts +++ b/std/log/test.ts @@ -17,7 +17,7 @@ class TestHandler extends log.handlers.BaseHandler { } } -test(async function defaultHandlers(): Promise { +test("defaultHandlers", async function (): Promise { const loggers: { [key: string]: (msg: string, ...args: unknown[]) => void; } = { @@ -55,7 +55,7 @@ test(async function defaultHandlers(): Promise { } }); -test(async function getLogger(): Promise { +test("getLogger", async function (): Promise { const handler = new TestHandler("DEBUG"); await log.setup({ @@ -76,7 +76,7 @@ test(async function getLogger(): Promise { assertEquals(logger.handlers, [handler]); }); -test(async function getLoggerWithName(): Promise { +test("getLoggerWithName", async function (): Promise { const fooHandler = new TestHandler("DEBUG"); await log.setup({ @@ -97,7 +97,7 @@ test(async function getLoggerWithName(): Promise { assertEquals(logger.handlers, [fooHandler]); }); -test(async function getLoggerUnknown(): Promise { +test("getLoggerUnknown", async function (): Promise { await log.setup({ handlers: {}, loggers: {}, @@ -109,7 +109,7 @@ test(async function getLoggerUnknown(): Promise { assertEquals(logger.handlers, []); }); -test(function getInvalidLoggerLevels(): void { +test("getInvalidLoggerLevels", function (): void { assertThrows(() => getLevelByName("FAKE_LOG_LEVEL" as LevelName)); assertThrows(() => getLevelName(5000)); }); -- cgit v1.2.3