chore: enable no-console eslint rule for tests and stories (#4816)
Re-enables no-console eslint rule in stories and tests files: - In stories, use `action` from '@storybook/addon-actions' or `fn` from '@storybook/test' instead of console. - In tests, console methods can be mocked like this: `global.console.error = jest.fn()`.
This commit is contained in:
@ -52,8 +52,7 @@ describe('useAvailableScopeIdOrThrow', () => {
|
||||
});
|
||||
|
||||
it('should throw an error if no scopeId is provided and scopeId is undefined in the context', () => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error = jest.fn();
|
||||
global.console.error = jest.fn();
|
||||
|
||||
const renderFunction = () =>
|
||||
renderHook(() => ({
|
||||
|
||||
Reference in New Issue
Block a user