Skip to content

Instantly share code, notes, and snippets.

@marta-pinkowska
Last active July 1, 2023 00:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marta-pinkowska/4130ca8d7336d063e41f8cab25f83496 to your computer and use it in GitHub Desktop.
Save marta-pinkowska/4130ca8d7336d063e41f8cab25f83496 to your computer and use it in GitHub Desktop.
// tools/jest/setupTests.js
const error = console.error;
console.error = (...args) =>
// Suppress error messages regarding network error in tests
/Error: Request failed with status code 500/m.test(
args[0]
)
? void 0
: error(...args);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment