{"size": 727, "ext": "js", "max_stars_repo_path": "test-utils.js", "max_stars_repo_name": "robinmetral/eaudepoisson.com", "max_stars_repo_stars_event_min_datetime": "2020-03-19T06:50:29.000Z", "max_stars_repo_stars_event_max_datetime": "2020-03-19T06:50:29.000Z", "max_issues_repo_path": "test-utils.js", "max_issues_repo_name": "robinmetral/eaudepoisson.com", "max_issues_repo_issues_event_min_datetime": "2020-02-23T15:59:29.000Z", "max_issues_repo_issues_event_max_datetime": "2020-06-12T10:39:42.000Z", "max_forks_repo_path": "test-utils.js", "max_forks_repo_name": "robinmetral/eaudepoisson.com", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 28, "max_forks_count": null, "avg_line_length": 25.9642857143, "max_line_length": 82, "alphanum_fraction": 0.6987620358}
// wraps all tests with the emotion theme provider
// from https://testing-library.com/docs/react-testing-library/setup#custom-render

import React from "react";
import { render } from "@testing-library/react";
import { ThemeProvider } from "emotion-theming";

import theme from "./src/theme";
import GlobalStyles from "./src/components/GlobalStyles";

const ThemeWrapper = ({ children }) => {
  return (
    <ThemeProvider theme={theme}>
      <GlobalStyles />
      {children}
    </ThemeProvider>
  );
};

const customRender = (ui, options) =>
  render(ui, { wrapper: ThemeWrapper, ...options });

// re-export everything
export * from "@testing-library/react";

// override render method
export { customRender as render };
