Skip to content

Commit b3a1855

Browse files
committed
Update utilities.class.test.js add unit-test for Logger
1 parent 49ce4ae commit b3a1855

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/lib/utilites.class.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,18 @@ test('Not isEmpty of not an empty Object', () => {
4949
).toBe(true);
5050
});
5151

52+
test('Logger test', () => {
53+
const spyOn = jest.spyOn(console, 'log')
54+
Utility.Logger(false, "Info", "Running Test on localhost")
55+
expect(
56+
spyOn
57+
).not.toHaveBeenCalled()
58+
})
59+
60+
test('Logger test', () => {
61+
const spyOn = jest.spyOn(console, 'log')
62+
Utility.Logger(true, "Info", "Running Test on localhost")
63+
expect(
64+
spyOn
65+
).toHaveBeenCalledWith("Info: Running Test on localhost")
66+
})

0 commit comments

Comments
 (0)