Skip to content

Commit

Permalink
test: force test failure when console errors are encountered
Browse files Browse the repository at this point in the history
  • Loading branch information
adamalston committed Dec 7, 2023
1 parent ab80ea9 commit d4cdc9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
import 'jest-canvas-mock';

console.error = (message) => {
throw new Error(`Console error: ${message}`);
};

0 comments on commit d4cdc9a

Please sign in to comment.