Skip to content

Commit 5c211b1

Browse files
committed
Add URL support, improve test
1 parent ef3dd47 commit 5c211b1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/Nodejs/5_pretty_Log_Types.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import "ts-jest";
22
import { Logger } from "../../src";
33
import { getConsoleLog, mockConsoleLog } from "./helper.js";
4+
import { stdout } from "process";
45

56
describe("Pretty: Log Types", () => {
67
beforeEach(() => {
@@ -80,6 +81,10 @@ describe("Pretty: Log Types", () => {
8081
logger.log(1234, "testLevel", url);
8182
expect(getConsoleLog()).toContain("https://example.com/");
8283
expect(getConsoleLog()).toContain("protocol:");
84+
const url2 = new URL("https://example2.com");
85+
logger.log(1234, "testLevel", { url2 });
86+
expect(getConsoleLog()).toContain("url2: {");
87+
expect(getConsoleLog()).toContain("https://example2.com/");
8388
});
8489

8590
test("String, Object", (): void => {

0 commit comments

Comments
 (0)