Skip to content

Commit

Permalink
chore: retain mock implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ymqy committed Jan 28, 2023
1 parent 4d6d480 commit 4a24a3c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -67,8 +67,8 @@ module.exports = function(initModules) {
// performs fn asynchronously and expects count errors logged to console.error.
// will fail the test if the count of errors logged is not equal to count.
async function expectErrors(fn, count) {
if (console.error.mockReset) {
console.error.mockReset();
if (console.error.mockClear) {
console.error.mockClear();
} else {
// TODO: Rewrite tests that use this helper to enumerate expected errors.
// This will enable the helper to use the .toErrorDev() matcher instead of spying.
Expand Down

0 comments on commit 4a24a3c

Please sign in to comment.