light-bolt11-decoder
Version:
<a href="https://nbd.wtf"><img align="right" height="196" src="https://user-images.githubusercontent.com/1653275/194609043-0add674b-dd40-41ed-986c-ab4a2e053092.png" /></a>
24 lines (20 loc) • 679 B
JavaScript
// @flow
const consoleError = console.error;
const suppressedErrors = [
'Error: Could not parse CSS stylesheet',
'Warning: Use the `defaultValue` or `value` props instead of setting children on <textarea>',
];
beforeEach(() => {
// Suppress errors from JSDOM CSS parser
// See: https://github.com/jsdom/jsdom/issues/2177
// eslint-disable-next-line flowtype-errors/show-errors
(console: any).error = message => {
if (!suppressedErrors.some(suppressedError => message.includes(suppressedError))) {
consoleError(message);
}
};
});
afterEach(() => {
// eslint-disable-next-line flowtype-errors/show-errors
(console: any).error = consoleError;
});