{"size": 520, "ext": "js", "max_stars_repo_path": "build/ssr/mockConsole.js", "max_stars_repo_name": "rholang/archive-old", "max_stars_repo_stars_event_min_datetime": "2020-04-24T13:28:17.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-24T13:28:17.000Z", "max_issues_repo_path": "build/ssr/mockConsole.js", "max_issues_repo_name": "rholang/archive-old", "max_issues_repo_issues_event_min_datetime": "2022-03-02T07:06:35.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T07:06:35.000Z", "max_forks_repo_path": "build/ssr/mockConsole.js", "max_forks_repo_name": "rholang/archive-old", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 24.7619047619, "max_line_length": 79, "alphanum_fraction": 0.5442307692}
export const mockConsole = console => {
  jest.spyOn(console, 'error').mockImplementation(() => {});

  return () => {
    // ignore warnings caused by emotion's server-side rendering approach
    // @ts-ignore
    // eslint-disable-next-line no-console

    const mockCalls = console.error.mock.calls.filter(
      ([f, s]: [any, any]) =>
        !(
          f ===
            'Warning: Did not expect server HTML to contain a <%s> in <%s>.' &&
          s === 'style'
        ),
    );

    return mockCalls;
  };
};
