Skip to content

Commit

Permalink
Add URL support, improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
terehov committed Aug 7, 2023
1 parent ef3dd47 commit 5c211b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Nodejs/5_pretty_Log_Types.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "ts-jest";
import { Logger } from "../../src";
import { getConsoleLog, mockConsoleLog } from "./helper.js";
import { stdout } from "process";

describe("Pretty: Log Types", () => {
beforeEach(() => {
Expand Down Expand Up @@ -80,6 +81,10 @@ describe("Pretty: Log Types", () => {
logger.log(1234, "testLevel", url);
expect(getConsoleLog()).toContain("https://example.com/");
expect(getConsoleLog()).toContain("protocol:");
const url2 = new URL("https://example2.com");
logger.log(1234, "testLevel", { url2 });
expect(getConsoleLog()).toContain("url2: {");
expect(getConsoleLog()).toContain("https://example2.com/");
});

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

0 comments on commit 5c211b1

Please sign in to comment.