Skip to content

Delete unnecessary use of clearAllMocks() and restoreAllMocks() in tests

Coung Ngo requested to merge cngo-delete-unnecessary-jest-calls into master

What does this MR do and why?

This MR deletes unnecessary uses of clearAllMocks() and restoreAllMocks() in tests.

In our jest.config.base.js configuration, we have clearMocks: true and restoreMocks: true which is equivalent to calling clearAllMocks() and restoreAllMocks() before each test, so we no longer need to explicitly call them.

Screenshots or screen recordings

How to set up and validate locally

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Coung Ngo

Merge request reports