Skip to content

Commit

Permalink
test: drop snapshots for logger tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermendes committed Aug 23, 2021
1 parent b0a50a5 commit 9430999
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 40 deletions.
38 changes: 0 additions & 38 deletions tests/unit/logger/__snapshots__/create.spec.ts.snap

This file was deleted.

8 changes: 6 additions & 2 deletions tests/unit/logger/create.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ describe('Logger', () => {
logger[type]('Hello');

expect(writeSpy).toHaveBeenCalledTimes(1);
expect(writeSpy.mock.calls[0]).toMatchSnapshot();
expect(writeSpy.mock.calls[0][0]).toEqual(
expect.stringContaining('Hello')
)
},
);

Expand All @@ -34,7 +36,9 @@ describe('Logger', () => {
logger.error(new Error('bad thing'));

expect(writeSpy).toHaveBeenCalledTimes(1);
expect(String(writeSpy.mock.calls[0][0]).split('\n')[0]).toMatchSnapshot();
expect(String(writeSpy.mock.calls[0][0])).toEqual(
expect.stringContaining('bad thing')
)
});

it('does not log messages below the log level', () => {
Expand Down

0 comments on commit 9430999

Please sign in to comment.