diff --git a/tests/unit/logger/__snapshots__/create.spec.ts.snap b/tests/unit/logger/__snapshots__/create.spec.ts.snap deleted file mode 100644 index 3222c5b..0000000 --- a/tests/unit/logger/__snapshots__/create.spec.ts.snap +++ /dev/null @@ -1,38 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Logger logs debug to stdout 1`] = ` -Array [ - "Hello -", -] -`; - -exports[`Logger logs errors to stderr 1`] = `"bad thing"`; - -exports[`Logger logs info to stdout 1`] = ` -Array [ - "Hello -", -] -`; - -exports[`Logger logs log to stdout 1`] = ` -Array [ - "Hello -", -] -`; - -exports[`Logger logs success to stdout 1`] = ` -Array [ - "Hello -", -] -`; - -exports[`Logger logs warn to stdout 1`] = ` -Array [ - "Hello -", -] -`; diff --git a/tests/unit/logger/create.spec.ts b/tests/unit/logger/create.spec.ts index f7a6e11..5cf265b 100644 --- a/tests/unit/logger/create.spec.ts +++ b/tests/unit/logger/create.spec.ts @@ -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') + ) }, ); @@ -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', () => {