Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
✅ Fix child logger name tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Vlasák committed Mar 2, 2020
1 parent 8fa83e1 commit 77a22e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ test('Child logger inherits parent name', () => {
const logger = loggerFactory('parent', { disableStackdriverFormat: true });
const childLogger = logger('child');

expect(childLogger.options.loggerName).toBe('parentchild');
expect(childLogger.options[loggerNameKey]).toBe('parentchild');
});

test('Child logger can create another child', () => {
const logger = loggerFactory('parent', { disableStackdriverFormat: true });
const childLogger = logger('child');
const kid = childLogger('grandkid');

expect(kid.options.loggerName).toBe('parentchildgrandkid');
expect(kid.options[loggerNameKey]).toBe('parentchildgrandkid');
});

0 comments on commit 77a22e3

Please sign in to comment.