diff options
Diffstat (limited to 'std/log')
-rw-r--r-- | std/log/handlers_test.ts | 6 | ||||
-rw-r--r-- | std/log/logger_test.ts | 6 | ||||
-rw-r--r-- | std/log/test.ts | 10 |
3 files changed, 11 insertions, 11 deletions
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<number, string[]>([ [ 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<void> { +test("defaultHandlers", async function (): Promise<void> { const loggers: { [key: string]: (msg: string, ...args: unknown[]) => void; } = { @@ -55,7 +55,7 @@ test(async function defaultHandlers(): Promise<void> { } }); -test(async function getLogger(): Promise<void> { +test("getLogger", async function (): Promise<void> { const handler = new TestHandler("DEBUG"); await log.setup({ @@ -76,7 +76,7 @@ test(async function getLogger(): Promise<void> { assertEquals(logger.handlers, [handler]); }); -test(async function getLoggerWithName(): Promise<void> { +test("getLoggerWithName", async function (): Promise<void> { const fooHandler = new TestHandler("DEBUG"); await log.setup({ @@ -97,7 +97,7 @@ test(async function getLoggerWithName(): Promise<void> { assertEquals(logger.handlers, [fooHandler]); }); -test(async function getLoggerUnknown(): Promise<void> { +test("getLoggerUnknown", async function (): Promise<void> { await log.setup({ handlers: {}, loggers: {}, @@ -109,7 +109,7 @@ test(async function getLoggerUnknown(): Promise<void> { assertEquals(logger.handlers, []); }); -test(function getInvalidLoggerLevels(): void { +test("getInvalidLoggerLevels", function (): void { assertThrows(() => getLevelByName("FAKE_LOG_LEVEL" as LevelName)); assertThrows(() => getLevelName(5000)); }); |