Skip to content

Create manual mock for logger #2466

Description

@luminousleek

Please confirm that you have searched existing issues in the repo

Yes, I have searched the existing issues

Any related issues?

#2099

What is the area that this feature belongs to?

Testing

Is your feature request related to a problem? Please describe.

To test for logger input, the logger is mocked and then calls to the logger are checked (see #2463 for an example). However, this must be done every for every file that the logger is mocked in, which is a bit annoying.

Describe the solution you'd like

Create a manual mock of the logger, so that we can just call jest.mock('logger'); at the start of each test. The default implementation of manual mocks can also be overridden though it's a bit more finnicky to do so.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions