Skip to content

Commit

Permalink
update context unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Ladzaretti committed Dec 15, 2024
1 parent 7ed3310 commit dd37a0a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/logger/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('logger/index', () => {
logger.debug(msg);

expect(getContext()).toBe(logContext);
expect(bunyanDebugSpy).toHaveBeenCalledWith(expect.anything(), msg);
expect(bunyanDebugSpy).toHaveBeenCalledWith({ logContext }, msg);
});

it('supports logging with metadata', () => {
Expand All @@ -73,8 +73,8 @@ describe('logger/index', () => {
});

it('sets meta', () => {
const logMeta = { baz: 'qux' };
const meta = { foo: 'bar' };
const logMeta = { foo: 'foo' };
const meta = { bar: 'bar' };
setMeta(meta);

logger.debug(logMeta, '');
Expand All @@ -87,8 +87,8 @@ describe('logger/index', () => {
});

it('adds meta', () => {
const logMeta = { baz: 'qux' };
const meta = { foo: 'bar' };
const logMeta = { foo: 'foo' };
const meta = { bar: 'bar' };
addMeta(meta);

logger.debug(logMeta, '');
Expand All @@ -101,8 +101,8 @@ describe('logger/index', () => {
});

it('removes meta', () => {
const logMeta = { baz: 'qux' };
const meta = { foo: 'bar' };
const logMeta = { foo: 'foo' };
const meta = { bar: 'bar' };
setMeta(meta);

logger.debug(logMeta, '');
Expand Down

0 comments on commit dd37a0a

Please sign in to comment.