Skip to content

Commit

Permalink
Increse test coverege
Browse files Browse the repository at this point in the history
  • Loading branch information
terehov committed Jan 20, 2021
1 parent 7e3189b commit 4560d7c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/parameter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ describe("Logger: Parameter", () => {
expect(doesLogContain(stdOut, "3")).toBeTruthy();
});

test("array with objects", (): void => {
logger.silly([{ 1: true }, { 2: true }, { 3: true }]);
expect(doesLogContain(stdOut, "SILLY")).toBeTruthy();
expect(doesLogContain(stdOut, "'1': true")).toBeTruthy();
});

test("object", (): void => {
const obj = {
null: null,
Expand All @@ -90,10 +96,20 @@ describe("Logger: Parameter", () => {
array: [1, 2, 3],
date: new Date(),
error: new Error(),
recursive: {},
object: {
null: null,
undefined: undefined,
boolean: true,
number: 0,
string: "string",
array: [1, 2, 3],
date: new Date(),
error: new Error(),
recursive: {},
},
},
};
obj.object.recursive = obj;
obj.object.object.recursive = obj.object;

logger.silly(obj);

Expand Down

0 comments on commit 4560d7c

Please sign in to comment.